CommonFuncs: Remove SLEEP macro

There's already a function in Thread for this.
This commit is contained in:
Lioncash
2015-09-04 02:14:10 -04:00
parent 4218fb4eea
commit a11ae2cf30
6 changed files with 9 additions and 16 deletions

View File

@ -74,7 +74,8 @@ void GeckoSockServer::GeckoConnectionWaiter()
new_client = std::make_unique<sf::TcpSocket>();
}
SLEEP(1);
Common::SleepCurrentThread(1);
}
}

View File

@ -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();

View File

@ -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)));
}