mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-25 20:24:42 +00:00
Fix Fullscreen
This commit is contained in:
@@ -1262,21 +1262,6 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Fullscreen state
|
||||
if (app.GetGameStarted())
|
||||
{
|
||||
const int primaryPad = ProfileManager.GetPrimaryPad();
|
||||
const unsigned char fullscreen = app.GetGameSettings(primaryPad, eGameSetting_Fullscreen);
|
||||
if (fullscreen && !g_isFullscreen)
|
||||
{
|
||||
EnableFullscreen();
|
||||
}
|
||||
if (!fullscreen && g_isFullscreen)
|
||||
{
|
||||
DisableFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Main message loop
|
||||
MSG msg = {0};
|
||||
@@ -1391,6 +1376,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
RenderManager.SetClearColour(kClearColorWhite); // set intro scene background to white
|
||||
RenderManager.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(pMinecraft->soundEngine->isStreamingWavebankReady() &&
|
||||
!pMinecraft->soundEngine->isPlayingStreamingGameMusic() &&
|
||||
@@ -1594,10 +1580,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
}
|
||||
}
|
||||
|
||||
const int primaryPad = ProfileManager.GetPrimaryPad();
|
||||
|
||||
// F1 toggles the HUD
|
||||
if (g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_TOGGLE_HUD))
|
||||
{
|
||||
const int primaryPad = ProfileManager.GetPrimaryPad();
|
||||
const unsigned char displayHud = app.GetGameSettings(primaryPad, eGameSetting_DisplayHUD);
|
||||
app.SetGameSettings(primaryPad, eGameSetting_DisplayHUD, displayHud ? 0 : 1);
|
||||
app.SetGameSettings(primaryPad, eGameSetting_DisplayHand, displayHud ? 0 : 1);
|
||||
@@ -1652,11 +1639,16 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
}
|
||||
#endif
|
||||
|
||||
// toggle fullscreen
|
||||
// Toggle fullscreen
|
||||
const unsigned char fullscreen = app.GetGameSettings(primaryPad, eGameSetting_Fullscreen);
|
||||
|
||||
if (fullscreen && !g_isFullscreen)
|
||||
EnableFullscreen();
|
||||
if (!fullscreen && g_isFullscreen)
|
||||
DisableFullscreen();
|
||||
|
||||
if (g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_FULLSCREEN))
|
||||
{
|
||||
const int primaryPad = ProfileManager.GetPrimaryPad();
|
||||
const unsigned char fullscreen = app.GetGameSettings(primaryPad, eGameSetting_Fullscreen);
|
||||
app.SetGameSettings(primaryPad, eGameSetting_Fullscreen, fullscreen ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user