mirror of https://github.com/LIJI32/SameBoy.git
Fix allow background controllers not working correctly on start up
This commit is contained in:
parent
c5362023c8
commit
ae14fcfbd7
|
@ -867,8 +867,6 @@ int main(int argc, char **argv)
|
|||
signal(SIGINT, debugger_interrupt);
|
||||
|
||||
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
|
||||
configuration.allow_background_controllers? "1" : "0");
|
||||
if ((console_supported = CON_start(completer))) {
|
||||
CON_set_repeat_empty(true);
|
||||
CON_printf("SameBoy v" GB_VERSION "\n");
|
||||
|
@ -931,6 +929,9 @@ int main(int argc, char **argv)
|
|||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
|
||||
configuration.allow_background_controllers? "1" : "0");
|
||||
|
||||
window = SDL_CreateWindow("SameBoy v" GB_VERSION, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
160 * configuration.default_scale, 144 * configuration.default_scale, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
|
|
Loading…
Reference in New Issue