git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3549 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY 2009-06-26 15:06:23 +00:00
parent d4625bcd3a
commit 8a6fcdc2bc
5 changed files with 2 additions and 28 deletions

View File

@ -1541,7 +1541,7 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event)
DoExtensionConnectedDisconnected(); DoExtensionConnectedDisconnected();
/* It doesn't seem to be needed but shouldn't it at least take 25 ms to /* It doesn't seem to be needed but shouldn't it at least take 25 ms to
reconnect an extension after we disconnected another? */ reconnect an extension after we disconnected another? */
if(g_EmulatorRunning) sleep(25); if(g_EmulatorRunning) SLEEP(25);
} }
// Update status // Update status

View File

@ -18,23 +18,9 @@
#ifndef MAIN_H #ifndef MAIN_H
#define MAIN_H #define MAIN_H
//////////////////////////////////////////////////////////////////////////////////////////
// Includes
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
#include <iostream> // System #include <iostream> // System
////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Definitions and declarations // Definitions and declarations
// ¯¯¯¯¯¯¯¯¯
#ifdef _WIN32
#define sleep(x) Sleep(x)
#else
#define sleep(x) usleep(x*1000)
#endif
void DoInitialize(); void DoInitialize();
double GetDoubleTime(); double GetDoubleTime();
int GetUpdateRate(); int GetUpdateRate();
@ -103,7 +89,6 @@ struct SRecordingAll
// extern ConfigDialog *frame; // extern ConfigDialog *frame;
//#endif //#endif
#endif #endif
////////////////////////////////
#endif // MAIN_H #endif // MAIN_H

View File

@ -321,7 +321,7 @@ void FlashLights(bool Connect)
if(Connect) wiiuse_rumble(WiiMoteReal::g_WiiMotesFromWiiUse[i], 1); if(Connect) wiiuse_rumble(WiiMoteReal::g_WiiMotesFromWiiUse[i], 1);
wiiuse_set_leds(WiiMoteReal::g_WiiMotesFromWiiUse[i], WIIMOTE_LED_1 | WIIMOTE_LED_2 | WIIMOTE_LED_3 | WIIMOTE_LED_4); wiiuse_set_leds(WiiMoteReal::g_WiiMotesFromWiiUse[i], WIIMOTE_LED_1 | WIIMOTE_LED_2 | WIIMOTE_LED_3 | WIIMOTE_LED_4);
} }
sleep(100); SLEEP(100);
for (int i = 0; i < g_NumberOfWiiMotes; i++) for (int i = 0; i < g_NumberOfWiiMotes; i++)
{ {

View File

@ -67,15 +67,9 @@
#pragma comment(lib, "winmm.lib") #pragma comment(lib, "winmm.lib")
#include <dinput.h> #include <dinput.h>
void FreeDirectInput(); // Needed in both nJoy.cpp and Rumble.cpp void FreeDirectInput(); // Needed in both nJoy.cpp and Rumble.cpp
#endif // _WIN32
#ifdef _WIN32
#define SLEEP(x) Sleep(x)
#else #else
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#define SLEEP(x) usleep(x*1000)
#endif #endif
#ifdef __linux__ #ifdef __linux__

View File

@ -60,15 +60,10 @@
#pragma comment(lib, "winmm.lib") #pragma comment(lib, "winmm.lib")
#include <dinput.h> #include <dinput.h>
#endif #endif
#endif // _WIN32
#ifdef _WIN32
#define SLEEP(x) Sleep(x)
#else #else
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#define SLEEP(x) usleep(x*1000)
#endif #endif
#ifdef __linux__ #ifdef __linux__