diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2025-01-14 06:33:54 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2025-01-14 06:33:54 +0100 |
commit | dced6f7768e02252af11f9b41017d75c66b47d81 (patch) | |
tree | 008f4cb816a09b776013d5903b34fb89c01cf042 /reduced_system_layer.c | |
parent | c9208089c6074575342d529f494295c13269a1aa (diff) | |
download | reduced_system_layer-dced6f7768e02252af11f9b41017d75c66b47d81.zip |
Correct examples for changed graphics procs
Diffstat (limited to 'reduced_system_layer.c')
-rwxr-xr-x | reduced_system_layer.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/reduced_system_layer.c b/reduced_system_layer.c index 3d020bd..522d672 100755 --- a/reduced_system_layer.c +++ b/reduced_system_layer.c @@ -1254,10 +1254,21 @@ void p_init(void) { i32 display_width = DisplayWidth (_display, screen); i32 display_height = DisplayHeight(_display, screen); - if (g_platform.frame_width <= 0) - g_platform.frame_width = 400; - if (g_platform.frame_height <= 0) - g_platform.frame_height = 300; + if (g_platform.frame_width <= 0 || g_platform.frame_height <= 0) { + if (display_width >= 1680 && display_height >= 1020) { + g_platform.frame_width = 1280; + g_platform.frame_height = 720; + } else if (display_width >= 800 && display_height >= 600) { + g_platform.frame_width = display_width - 400; + g_platform.frame_height = display_height - 300; + } else if (display_width >= 400 && display_height >= 300) { + g_platform.frame_width = 400; + g_platform.frame_height = 300; + } else { + g_platform.frame_width = display_width; + g_platform.frame_height = display_height; + } + } i32 x = (display_width - g_platform.frame_width) / 2; i32 y = (display_height - g_platform.frame_height) / 2; |