nJoy: Added #ifdef INPUTCOMMON
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1994 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
46da45a529
commit
361aed6811
|
@ -197,31 +197,10 @@ void DllConfig(HWND _hParent)
|
||||||
emulator_running = false; // Set it back to false
|
emulator_running = false; // Set it back to false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
g_Config.Load(); // Load settings
|
g_Config.Load(); // Load settings
|
||||||
|
|
||||||
// We don't need a parent for this wxDialog
|
|
||||||
//wxWindow win;
|
|
||||||
//win.SetHWND(_hParent);
|
|
||||||
//ConfigBox frame(&win);
|
|
||||||
//win.SetHWND(0);
|
|
||||||
|
|
||||||
m_frame = new ConfigBox(NULL);
|
m_frame = new ConfigBox(NULL);
|
||||||
m_frame->ShowModal();
|
m_frame->ShowModal();
|
||||||
|
|
||||||
#else
|
|
||||||
if (SDL_Init(SDL_INIT_JOYSTICK ) < 0)
|
|
||||||
{
|
|
||||||
printf("Could not initialize SDL! (%s)\n", SDL_GetError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_Config.Load(); // load settings
|
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
ConfigBox frame(NULL);
|
|
||||||
frame.ShowModal();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,13 +220,20 @@ void Initialize(void *init)
|
||||||
// Debugging
|
// Debugging
|
||||||
//Console::Open();
|
//Console::Open();
|
||||||
SPADInitialize *_PADInitialize = (SPADInitialize*)init;
|
SPADInitialize *_PADInitialize = (SPADInitialize*)init;
|
||||||
|
#ifndef INPUTCOMMON
|
||||||
Console::Print("Initialize: %i, %i\n", _PADInitialize->padNumber, SDL_WasInit(0));
|
Console::Print("Initialize: %i, %i\n", _PADInitialize->padNumber, SDL_WasInit(0));
|
||||||
|
#endif
|
||||||
|
|
||||||
emulator_running = true;
|
emulator_running = true;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
DEBUG_INIT();
|
DEBUG_INIT();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
m_hWnd = (HWND)_PADInitialize->hWnd;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef INPUTCOMMON
|
||||||
/* SDL 1.3 use DirectInput instead of the old Microsoft Multimeda API, and with this we need
|
/* SDL 1.3 use DirectInput instead of the old Microsoft Multimeda API, and with this we need
|
||||||
the SDL_INIT_VIDEO flag to */
|
the SDL_INIT_VIDEO flag to */
|
||||||
if (!SDL_WasInit(0))
|
if (!SDL_WasInit(0))
|
||||||
|
@ -260,10 +246,8 @@ void Initialize(void *init)
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
m_hWnd = (HWND)_PADInitialize->hWnd;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Search_Devices(); // Populate joyinfo for all attached devices
|
Search_Devices(); // Populate joyinfo for all attached devices
|
||||||
g_Config.Load(); // Load joystick mapping, PadMapping[].ID etc
|
g_Config.Load(); // Load joystick mapping, PadMapping[].ID etc
|
||||||
if (PadMapping[0].enabled)
|
if (PadMapping[0].enabled)
|
||||||
|
@ -313,11 +297,7 @@ int Search_Devices()
|
||||||
// Warn the user if no PadMapping are detected
|
// Warn the user if no PadMapping are detected
|
||||||
if (numjoy == 0)
|
if (numjoy == 0)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
PanicAlert("No Joystick detected");
|
||||||
//MessageBox(NULL, "No Joystick detected!", NULL, MB_ICONWARNING);
|
|
||||||
#else
|
|
||||||
printf("No Joystick detected!\n");
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +352,9 @@ void Shutdown()
|
||||||
if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID))
|
if (PadMapping[3].enabled && SDL_JoystickOpened(PadMapping[3].ID))
|
||||||
SDL_JoystickClose(joystate[3].joy);
|
SDL_JoystickClose(joystate[3].joy);
|
||||||
|
|
||||||
|
#ifndef INPUTCOMMON
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
DEBUG_QUIT();
|
DEBUG_QUIT();
|
||||||
|
|
|
@ -95,6 +95,8 @@
|
||||||
// Define
|
// Define
|
||||||
// ¯¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯¯
|
||||||
|
|
||||||
|
//#define INPUTCOMMON
|
||||||
|
|
||||||
#define INPUT_VERSION "0.3"
|
#define INPUT_VERSION "0.3"
|
||||||
#define INPUT_STATE "PUBLIC RELEASE"
|
#define INPUT_STATE "PUBLIC RELEASE"
|
||||||
#define RELDAY "21"
|
#define RELDAY "21"
|
||||||
|
|
Loading…
Reference in New Issue