Day 36 complete.

This commit is contained in:
igor
2026-04-17 21:51:15 -07:00
parent 9bc7fa3b52
commit 1c1bea8a05
4 changed files with 52 additions and 3 deletions
+8 -3
View File
@@ -548,7 +548,7 @@ S32 main(S32 argc, char *argv[])
/* NOTE: Floating windows are not supported oficially by Wayland
* protocol. However, SDL_WINDOW_ALWAYS_ON_TOP does work on KDE
* under Wayland. I have not tested GNOME. */
SDL_Window *Window = SDL_CreateWindow("Handmade Hero", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, RESOLUTION_WIDTH, RESOLUTION_HEIGHT, SDL_WINDOW_RESIZABLE);
SDL_Window *Window = SDL_CreateWindow("Handmade Hero", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, RESOLUTION_WIDTH+20, RESOLUTION_HEIGHT+20, SDL_WINDOW_RESIZABLE);
/*SDL_WINDOW_RESIZABLE |
SDL_WINDOW_ALWAYS_ON_TOP);*/
@@ -559,6 +559,10 @@ S32 main(S32 argc, char *argv[])
SDL_Renderer *Renderer = SDL_CreateRenderer(Window, -1, SDL_RENDERER_PRESENTVSYNC);
SDL_SetWindowPosition(Window, (display_mode.w - RESOLUTION_WIDTH), (display_mode.h - RESOLUTION_HEIGHT));
/* NOTE: For future reference, the custom window bar should use
* SDL_SetWindowHitTest to define areas that will be used to
* drag the window. */
/* "Wayland needs an event loop and rendering or it won't function."
* https://github.com/libsdl-org/SDL/issues/7699#issuecomment-1545684792 */
/* NOTE: This means that we need to readraw to even resize the
@@ -581,8 +585,9 @@ S32 main(S32 argc, char *argv[])
GlobalRunning = TRUE;
sdl_window_dimension Dimension = SDLGetWindowDimension(Window);
SDLResizeTexture(&GlobalBackbuffer, Renderer, Dimension.Width, Dimension.Height);
//sdl_window_dimension Dimension = SDLGetWindowDimension(Window);
//SDLResizeTexture(&GlobalBackbuffer, Renderer, Dimension.Width, Dimension.Height);
SDLResizeTexture(&GlobalBackbuffer, Renderer, RESOLUTION_WIDTH, RESOLUTION_HEIGHT);
sdl_sound_output SoundOutput;
memset(&SoundOutput, 0, sizeof(SoundOutput));