mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
Reduce CPU overload
This commit is contained in:
parent
e56b85875c
commit
b6e91d47ff
1 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue