Renamed UpdateScreen() to UpdateGuiScreen()

To avoid confusion with the emulation screen
This commit is contained in:
Dimitris Panokostas 2017-02-23 00:34:24 +01:00
parent 8c1c8110c5
commit 0ab994809d
8 changed files with 60 additions and 60 deletions

View file

@ -251,7 +251,7 @@ static void CreateFilesysHardfileLoop()
uae_gui->draw(); uae_gui->draw();
// Finally we update the screen. // Finally we update the screen.
UpdateScreen(); UpdateGuiScreen();
} }
} }

View file

@ -316,7 +316,7 @@ static void EditFilesysHardfileLoop()
uae_gui->draw(); uae_gui->draw();
// Finally we update the screen. // Finally we update the screen.
UpdateScreen(); UpdateGuiScreen();
} }
} }

View file

@ -201,62 +201,62 @@ static void ExitEditFilesysVirtual(void)
static void EditFilesysVirtualLoop(void) static void EditFilesysVirtualLoop(void)
{ {
while(!dialogFinished) while (!dialogFinished)
{ {
SDL_Event event; SDL_Event event;
while(SDL_PollEvent(&event)) while (SDL_PollEvent(&event))
{ {
if (event.type == SDL_KEYDOWN) if (event.type == SDL_KEYDOWN)
{ {
switch(event.key.keysym.sym) switch (event.key.keysym.sym)
{ {
case VK_ESCAPE: case VK_ESCAPE:
dialogFinished = true; dialogFinished = true;
break; break;
case VK_UP:
if(HandleNavigation(DIRECTION_UP))
continue; // Don't change value when enter ComboBox -> don't send event to control
break;
case VK_DOWN:
if(HandleNavigation(DIRECTION_DOWN))
continue; // Don't change value when enter ComboBox -> don't send event to control
break;
case VK_LEFT: case VK_UP:
if(HandleNavigation(DIRECTION_LEFT)) if (HandleNavigation(DIRECTION_UP))
continue; // Don't change value when enter Slider -> don't send event to control continue; // Don't change value when enter ComboBox -> don't send event to control
break; break;
case VK_RIGHT:
if(HandleNavigation(DIRECTION_RIGHT))
continue; // Don't change value when enter Slider -> don't send event to control
break;
case VK_X: case VK_DOWN:
case VK_A: if (HandleNavigation(DIRECTION_DOWN))
event.key.keysym.sym = SDLK_RETURN; continue; // Don't change value when enter ComboBox -> don't send event to control
gui_input->pushInput(event); // Fire key down break;
event.type = SDL_KEYUP; // and the key up
break;
}
}
//------------------------------------------------- case VK_LEFT:
// Send event to guisan-controls if (HandleNavigation(DIRECTION_LEFT))
//------------------------------------------------- continue; // Don't change value when enter Slider -> don't send event to control
gui_input->pushInput(event); break;
}
// Now we let the Gui object perform its logic. case VK_RIGHT:
uae_gui->logic(); if (HandleNavigation(DIRECTION_RIGHT))
// Now we let the Gui object draw itself. continue; // Don't change value when enter Slider -> don't send event to control
uae_gui->draw(); break;
// Finally we update the screen.
case VK_X:
UpdateScreen(); case VK_A:
} event.key.keysym.sym = SDLK_RETURN;
gui_input->pushInput(event); // Fire key down
event.type = SDL_KEYUP; // and the key up
break;
}
}
//-------------------------------------------------
// Send event to guisan-controls
//-------------------------------------------------
gui_input->pushInput(event);
}
// Now we let the Gui object perform its logic.
uae_gui->logic();
// Now we let the Gui object draw itself.
uae_gui->draw();
// Finally we update the screen.
UpdateGuiScreen();
}
} }

View file

@ -125,7 +125,7 @@ void InGameMessage(const char *msg)
// Finally we update the screen. // Finally we update the screen.
if (!drawn) if (!drawn)
{ {
UpdateScreen(); UpdateGuiScreen();
} }
drawn = true; drawn = true;
} }

View file

@ -352,7 +352,7 @@ static void SelectFileLoop()
uae_gui->draw(); uae_gui->draw();
// Finally we update the screen. // Finally we update the screen.
UpdateScreen(); UpdateGuiScreen();
if (!dialogCreated) if (!dialogCreated)
{ {

View file

@ -144,7 +144,7 @@ static void ShowMessageLoop()
uae_gui->draw(); uae_gui->draw();
// Finally we update the screen. // Finally we update the screen.
UpdateScreen(); UpdateGuiScreen();
} }
} }

View file

@ -124,6 +124,6 @@ extern char *screenshot_filename;
extern int currentStateNum; extern int currentStateNum;
extern int delay_savestate_frame; extern int delay_savestate_frame;
extern void UpdateScreen(); extern void UpdateGuiScreen();
#endif // _GUI_HANDLING_H #endif // _GUI_HANDLING_H

View file

@ -139,7 +139,7 @@ void RegisterRefreshFunc(void (*func)())
refreshFuncAfterDraw = func; refreshFuncAfterDraw = func;
} }
void UpdateScreen() void UpdateGuiScreen()
{ {
// Update the texture from the surface // Update the texture from the surface
SDL_UpdateTexture(gui_texture, nullptr, gui_screen->pixels, gui_screen->pitch); SDL_UpdateTexture(gui_texture, nullptr, gui_screen->pixels, gui_screen->pitch);
@ -319,7 +319,7 @@ namespace sdl
uae_gui->draw(); uae_gui->draw();
// Finally we update the screen. // Finally we update the screen.
UpdateScreen(); UpdateGuiScreen();
if (refreshFuncAfterDraw != nullptr) if (refreshFuncAfterDraw != nullptr)
{ {