mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
CommonFuncs: Remove SLEEP macro
There's already a function in Thread for this.
This commit is contained in:
@ -74,7 +74,8 @@ void GeckoSockServer::GeckoConnectionWaiter()
|
||||
|
||||
new_client = std::make_unique<sf::TcpSocket>();
|
||||
}
|
||||
SLEEP(1);
|
||||
|
||||
Common::SleepCurrentThread(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
|
||||
#include "Core/HW/WiimoteReal/WiimoteReal.h"
|
||||
|
||||
@ -250,7 +251,7 @@ void WiimoteScanner::Update()
|
||||
// Some hacks that allows disconnects to be detected before connections are handled
|
||||
// workaround for Wiimote 1 moving to slot 2 on temporary disconnect
|
||||
if (forgot_some)
|
||||
SLEEP(100);
|
||||
Common::SleepCurrentThread(100);
|
||||
}
|
||||
|
||||
// Find and connect Wiimotes.
|
||||
@ -313,12 +314,8 @@ void WiimoteScanner::FindWiimotes(std::vector<Wiimote*> & found_wiimotes, Wiimot
|
||||
}
|
||||
|
||||
SetupDiDestroyDeviceInfoList(device_info);
|
||||
|
||||
// Don't mind me, just a random sleep to fix stuff on Windows
|
||||
//if (!wiimotes.empty())
|
||||
// SLEEP(2000);
|
||||
|
||||
}
|
||||
|
||||
int CheckDeviceType_Write(HANDLE &dev_handle, const u8* buf, size_t size, int attempts)
|
||||
{
|
||||
OVERLAPPED hid_overlap_write = OVERLAPPED();
|
||||
|
@ -359,7 +359,7 @@ bool Wiimote::PrepareOnThread()
|
||||
|
||||
return (IOWrite(mode_report, sizeof(mode_report)) &&
|
||||
IOWrite(led_report, sizeof(led_report)) &&
|
||||
(SLEEP(200), IOWrite(rumble_report, sizeof(rumble_report))) &&
|
||||
(Common::SleepCurrentThread(200), IOWrite(rumble_report, sizeof(rumble_report))) &&
|
||||
IOWrite(req_status_report, sizeof(req_status_report)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user