Reduce CPU overload

This commit is contained in:
Xphalnos 2025-06-20 22:12:34 +02:00
parent e56b85875c
commit b6e91d47ff

View file

@ -1,5 +1,7 @@
// Copyright 2025 Pound Emulator Project. All rights reserved. // Copyright 2025 Pound Emulator Project. All rights reserved.
#include <thread>
#include "Base/Logging/Backend.h" #include "Base/Logging/Backend.h"
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
@ -63,6 +65,7 @@ int main() {
bool rendering = true; bool rendering = true;
while (rendering) { while (rendering) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
// Process events. // Process events.
while (SDL_PollEvent(&windowEvent)) { while (SDL_PollEvent(&windowEvent)) {
switch (windowEvent.type) { switch (windowEvent.type) {