Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 45e36a1

Browse files
committed
Allow ALT+ENTER to instantly switch between 1X and 2X modes if conditions are met
1 parent 02b8469 commit 45e36a1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Managers/FrameMan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ namespace RTE {
328328
if (multiplier <= 0 || multiplier > 4 || multiplier == m_ResMultiplier) {
329329
return -1;
330330
}
331-
if (m_ResX > m_ScreenResX / multiplier) {
331+
if (m_ResX > m_ScreenResX / multiplier || m_ResY > m_ScreenResY / multiplier) {
332+
allegro_message("Requested resolution multiplier will result in game window exceeding display bounds!\nNo change will be made!");
332333
return -1;
333334
}
334335

Managers/UInputMan.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,6 +2793,10 @@ int UInputMan::Update()
27932793
g_ConsoleMan.PrintString("SYSTEM: Activity was reset!");
27942794
}
27952795

2796+
if (key_shifts & KB_ALT_FLAG && KeyPressed(KEY_ENTER)) {
2797+
g_FrameMan.SwitchResolutionMultiplier((g_FrameMan.ResolutionMultiplier() >= 2) ? 1 : 2);
2798+
}
2799+
27962800
// Only allow performance tweaking if showing the stats
27972801
if (g_PerformanceMan.IsShowingPerformanceStats())
27982802
{

0 commit comments

Comments
 (0)