- [FIX] No comprobava correctament la pulsació de Escape

- [FIX] linea de compilació de Windows sense el SDLmain eixe
This commit is contained in:
2025-06-10 13:01:01 +02:00
parent 9e529c8dcf
commit c862ba56e7
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
windows: windows:
g++ *.cpp -lmingw32 -lSDL3main -lSDL3 -lopengl32 -mwindows -o shaders g++ *.cpp -lmingw32 -lSDL3 -lopengl32 -mwindows -o shaders
linux: linux:
g++ -g *.cpp -lSDL3 -lGL -o shaders g++ -g *.cpp -lSDL3 -lGL -o shaders

View File

@@ -39,7 +39,7 @@ int main(int argc, char **argv)
{ {
SDL_Event e; SDL_Event e;
while ( SDL_PollEvent(&e) ) { while ( SDL_PollEvent(&e) ) {
if ( e.type == SDL_EVENT_QUIT || ( e.type == SDL_EVENT_KEY_DOWN && e.key.scancode == SDLK_ESCAPE ) ) { should_exit = true; } if ( e.type == SDL_EVENT_QUIT || ( e.type == SDL_EVENT_KEY_DOWN && e.key.scancode == SDL_SCANCODE_ESCAPE ) ) { should_exit = true; }
} }
SDL_SetRenderTarget(renderer, texTarget); SDL_SetRenderTarget(renderer, texTarget);