1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00
This commit is contained in:
Mathieu Schroeter 2022-01-14 23:34:05 +01:00
parent d5cf8820ef
commit 58d18d52b2
No known key found for this signature in database
GPG Key ID: 8B9145A5FA9DA8A8

View File

@ -3087,7 +3087,7 @@ CEvent::EventButtons (const SDL_Event & event, Point pos)
if (m_phase == EV_PHASE_PLAY) if (m_phase == EV_PHASE_PLAY)
{ {
auto progress = [&](CJauge & prog, const char * text) -> bool { auto progress = [&] (CJauge & prog, const char * text) -> bool {
if (prog.GetHide ()) if (prog.GetHide ())
return false; return false;
@ -4445,23 +4445,20 @@ CEvent::ChangeButtons (Sint32 message)
++m_Lang; ++m_Lang;
SetLanguage (); SetLanguage ();
break; break;
case EV_BUTTON3: case EV_BUTTON3: {
{
auto zoom = g_zoom; auto zoom = g_zoom;
g_zoom = g_settingsOverload & SETTING_LEGACY ? 2 : 1; g_zoom = g_settingsOverload & SETTING_LEGACY ? 2 : 1;
SetFullScreen (true, zoom); SetFullScreen (true, zoom);
break; break;
} }
case EV_BUTTON4: case EV_BUTTON4: {
{
Sint32 w1; Sint32 w1;
SDL_GetWindowSize (g_window, &w1, nullptr); SDL_GetWindowSize (g_window, &w1, nullptr);
SetFullScreen (false); SetFullScreen (false);
SetWindowSize (g_zoom * static_cast<double> (w1) / LXIMAGE (), g_zoom); SetWindowSize (g_zoom * static_cast<double> (w1) / LXIMAGE (), g_zoom);
break; break;
} }
case EV_BUTTON5: case EV_BUTTON5: {
{
auto scale = g_zoom; auto scale = g_zoom;
if (g_zoom > 1) if (g_zoom > 1)
--g_zoom; --g_zoom;
@ -4480,8 +4477,7 @@ CEvent::ChangeButtons (Sint32 message)
SetFullScreen (g_bFullScreen); SetFullScreen (g_bFullScreen);
break; break;
} }
case EV_BUTTON6: case EV_BUTTON6: {
{
auto scale = g_zoom; auto scale = g_zoom;
if (g_zoom < 2) if (g_zoom < 2)
++g_zoom; ++g_zoom;
@ -5858,8 +5854,7 @@ CEvent::TreatEventBase (const SDL_Event & event)
ChangePhase (EV_PHASE_BYE); ChangePhase (EV_PHASE_BYE);
return true; return true;
case EV_PHASE_BYE: case EV_PHASE_BYE: {
{
SDL_Event ev; SDL_Event ev;
ev.type = SDL_QUIT; ev.type = SDL_QUIT;
SDL_PushEvent (&ev); SDL_PushEvent (&ev);