Float fields working

This commit is contained in:
2024-10-20 01:38:27 +02:00
parent 89c95c0656
commit 84bb7b1eaa
7 changed files with 107 additions and 34 deletions

View File

@@ -3,6 +3,8 @@ Window :: struct {
height: u32;
}
WINDOW_SIZE :: 42000;
SDL_Window_Type :: struct {
using #as window : Window;
@@ -31,6 +33,14 @@ create_window :: (title: string, width: u32, height: u32, fullscreen: bool) -> *
flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
}
if width == WINDOW_SIZE {
screen_width = display_mode.w;
}
if height == WINDOW_SIZE {
screen_height = display_mode.h;
}
sdl_window := SDL_CreateWindow(to_c_string(title,, temp), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, screen_width, screen_height, flags);
if sdl_window == null {