mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed a number of potential issues where SDL_Event unions were not properly initialized
This commit is contained in:
parent
9cd35bed3d
commit
6bad84a27a
|
@ -162,7 +162,7 @@ void ViewController::migratedAppDataFilesDialog()
|
|||
mWindow->pushGui(new GuiMsgBox(
|
||||
HelpStyle(), message.c_str(), "QUIT",
|
||||
[] {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
},
|
||||
|
@ -201,7 +201,7 @@ void ViewController::invalidSystemsFileDialog()
|
|||
mWindow->pushGui(new GuiMsgBox(
|
||||
HelpStyle(), errorMessage.c_str(), "QUIT",
|
||||
[] {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
},
|
||||
|
@ -318,7 +318,7 @@ void ViewController::noGamesDialog()
|
|||
},
|
||||
"QUIT",
|
||||
[] {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
},
|
||||
|
@ -1462,7 +1462,7 @@ void ViewController::rescanROMDirectory()
|
|||
SystemData::loadConfig();
|
||||
|
||||
if (SystemData::sStartupExitSignal) {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
return;
|
||||
|
@ -1477,7 +1477,7 @@ void ViewController::rescanROMDirectory()
|
|||
else {
|
||||
preload();
|
||||
if (SystemData::sStartupExitSignal) {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
return;
|
||||
|
|
|
@ -48,7 +48,7 @@ static void onKeyPress(void* /*cbParam*/, const CEC::cec_keypress* key)
|
|||
{
|
||||
LOG(LogDebug) << "CECInput::onKeyPress keycode: " << CECInput::getKeyCodeString(key->keycode);
|
||||
|
||||
SDL_Event event;
|
||||
SDL_Event event {};
|
||||
event.type = (key->duration > 0) ? SDL_USER_CECBUTTONUP : SDL_USER_CECBUTTONDOWN;
|
||||
event.user.code = key->keycode;
|
||||
SDL_PushEvent(&event);
|
||||
|
|
|
@ -454,7 +454,7 @@ bool InputManager::parseEvent(const SDL_Event& event)
|
|||
#if defined(__ANDROID__)
|
||||
// Quit application if the back button is pressed.
|
||||
if (event.key.keysym.sym == SDLK_AC_BACK) {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
return false;
|
||||
|
@ -490,7 +490,7 @@ bool InputManager::parseEvent(const SDL_Event& event)
|
|||
quitES = true;
|
||||
|
||||
if (quitES) {
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
return false;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
class InputConfig;
|
||||
class Window;
|
||||
union SDL_Event;
|
||||
|
||||
class InputManager
|
||||
{
|
||||
|
|
|
@ -330,7 +330,7 @@ namespace Utils
|
|||
{
|
||||
sQuitMode = mode;
|
||||
|
||||
SDL_Event quit;
|
||||
SDL_Event quit {};
|
||||
quit.type = SDL_QUIT;
|
||||
SDL_PushEvent(&quit);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue