CTitleStateMenu: implemented rebooting into installer

This commit is contained in:
Hyper
2024-12-08 02:57:27 +00:00
parent fc9c7ffb3a
commit d69f0442a7
16 changed files with 123 additions and 25 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ std::tuple<std::tuple<ImVec2, ImVec2>, GuestTexture*> GetButtonIcon(EButtonIcon
std::tuple<ImVec2, ImVec2> btn;
GuestTexture* texture;
auto isPlayStation = g_isAppInit
auto isPlayStation = App::s_isInit
? Config::ControllerIcons == EControllerIcons::PlayStation
: hid::detail::g_inputDevice == hid::detail::EInputDevice::PlayStation;
+4 -4
View File
@@ -65,7 +65,7 @@ public:
{
case SDL_KEYDOWN:
{
if (g_isAppInit)
if (App::s_isInit)
break;
switch (event->key.keysym.scancode)
@@ -93,7 +93,7 @@ public:
case SDL_MOUSEBUTTONDOWN:
{
if (g_isAppInit)
if (App::s_isInit)
break;
g_isAccepted = true;
@@ -273,8 +273,8 @@ void MessageWindow::Draw()
auto textMarginX = Scale(37);
auto textMarginY = Scale(45);
bool isController = g_isAppInit ? true : hid::detail::IsInputDeviceController();
bool isKeyboard = g_isAppInit ? false : hid::detail::g_inputDevice == hid::detail::EInputDevice::Keyboard;
bool isController = App::s_isInit ? true : hid::detail::IsInputDeviceController();
bool isKeyboard = App::s_isInit ? false : hid::detail::g_inputDevice == hid::detail::EInputDevice::Keyboard;
if (DrawContainer(g_appearTime, centre, { textSize.x / 2 + textMarginX, textSize.y / 2 + textMarginY }, !g_isControlsVisible))
{
+2 -1
View File
@@ -2,6 +2,7 @@
#include "sdl_listener.h"
#include <user/config.h>
#include <SDL_syswm.h>
#include <app.h>
bool m_isFullscreenKeyReleased = true;
bool m_isResizing = false;
@@ -18,7 +19,7 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
{
case SDL_QUIT:
Config::Save();
ExitProcess(0);
App::Exit();
break;
case SDL_KEYDOWN: