Make Windows sleep for less

This commit is contained in:
Lorenzooone
2025-02-10 21:47:50 +01:00
parent 50ba513adc
commit 5c3b79b85e
4 changed files with 20 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
#include "frontend.hpp"
#include <iostream>
#include <thread>
#include <SFML/System.hpp>
const CropData default_3ds_crop = {
.top_width = TOP_WIDTH_3DS, .top_height = HEIGHT_3DS,
@@ -875,7 +876,7 @@ void update_connected_specific_settings(FrontendData* frontend_data, const Captu
void default_sleep(float wanted_ms) {
if(wanted_ms < 0)
wanted_ms = 1000.0/USB_CHECKS_PER_SECOND;
std::this_thread::sleep_for(std::chrono::microseconds((int)(wanted_ms * 1000)));
sf::sleep(sf::microseconds((int)(wanted_ms * 1000)));
}
void screen_display_thread(WindowScreen *screen) {