Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 623 Lines • ▼ Show 20 Lines | #endif | ||||
if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE) < 0) | if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE) < 0) | ||||
{ | { | ||||
LOGERROR("SDL library initialization failed: %s", SDL_GetError()); | LOGERROR("SDL library initialization failed: %s", SDL_GetError()); | ||||
throw PSERROR_System_SDLInitFailed(); | throw PSERROR_System_SDLInitFailed(); | ||||
} | } | ||||
atexit(SDL_Quit); | atexit(SDL_Quit); | ||||
// Text input is active by default, disable it until it is actually needed. | |||||
SDL_StopTextInput(); | |||||
#if OS_MACOSX | #if OS_MACOSX | ||||
// Some Mac mice only have one button, so they can't right-click | // Some Mac mice only have one button, so they can't right-click | ||||
// but SDL2 can emulate that with Ctrl+Click | // but SDL2 can emulate that with Ctrl+Click | ||||
bool macMouse = false; | bool macMouse = false; | ||||
CFG_GET_VAL("macmouse", macMouse); | CFG_GET_VAL("macmouse", macMouse); | ||||
SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, macMouse ? "1" : "0"); | SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, macMouse ? "1" : "0"); | ||||
#endif | #endif | ||||
} | } | ||||
▲ Show 20 Lines • Show All 979 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator