Merge pull request #1189 from colobot/dev-msvc

Add some Visual Studio specific fixes
1008-fix
tomangelo 2018-09-08 22:00:47 +02:00 committed by GitHub
commit a76bbe49ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 6 deletions

View File

@ -204,7 +204,7 @@ option(DEV_BUILD "Enable development build (enables some debugging tools, local
# Official build - changes text on the crash screen
# PLEASE DO NOT USE ON UNOFFICIAL BUILDS. Thanks.
option(OFFICIAL_BUILD "Official build (changes crash screen text)" OFF)
option(OFFICIAL_COLOBOT_BUILD "Official build (changes crash screen text)" OFF)
# Portable build - load all data from current directory
option(PORTABLE "Portable build" OFF)

View File

@ -1871,7 +1871,12 @@ void CApplication::SetLanguage(Language language)
// Update C++ locale
try
{
#if defined(_MSC_VER) && defined(_DEBUG)
// Avoids failed assertion in VS debugger
throw -1;
#else
std::locale::global(std::locale(systemLocale.c_str()));
#endif
}
catch (...)
{

View File

@ -133,7 +133,7 @@ void CSignalHandlers::ReportError(const std::string& errorMessage)
msg << "including information on what you were doing before this happened and all the information below." << std::endl;
msg << "==============================" << std::endl;
#if BUILD_NUMBER == 0
#ifdef OFFICIAL_BUILD
#ifdef OFFICIAL_COLOBOT_BUILD
msg << "You are running official " << COLOBOT_VERSION_DISPLAY << " build." << std::endl;
#else
// COLOBOT_VERSION_DISPLAY doesn't update if you don't run CMake after "git pull"

View File

@ -4,4 +4,4 @@
#define COLOBOT_VERSION_DISPLAY "@COLOBOT_VERSION_DISPLAY@"
#define BUILD_NUMBER @BUILD_NUMBER@
#cmakedefine OFFICIAL_BUILD
#cmakedefine OFFICIAL_COLOBOT_BUILD

View File

@ -433,7 +433,7 @@ bool CEngine::ProcessEvent(const Event &event)
{
auto data = event.GetData<KeyEventData>();
if (data->key == KEY(F12))
if (data->key == KEY(F11) || data->key == KEY(F12))
{
m_showStats = !m_showStats;
return false;

View File

@ -779,7 +779,7 @@ bool CRobotMain::ProcessEvent(Event &event)
if (IsPhaseWithWorld(m_phase))
{
if (data->key == KEY(F11))
if (data->key == KEY(F10))
{
m_debugMenu->ToggleInterface();
return false;

View File

@ -39,7 +39,7 @@ class CInterface;
/**
* \class CDebugMenu
* \brief Handles debug menu (F11)
* \brief Handles debug menu (F10)
*
* There should always be only one instance of this class for each associated CRobotMain class.
*/