Various NOWX fixes thanks to tinctorius, please verify this!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1797 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f156361104
commit
bfe43d0c61
|
@ -18,6 +18,7 @@
|
|||
#include "Globals.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include "GLUtil.h"
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void DoDllDebugger()
|
|||
//m_frame->Show();
|
||||
}
|
||||
#else
|
||||
void DllDebugger(HWND _hParent) { }
|
||||
void DllDebugger(HWND _hParent, bool Show) { }
|
||||
void DoDllDebugger() { }
|
||||
#endif
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
// Include
|
||||
// ¯¯¯¯¯¯¯¯¯
|
||||
#include "nJoy.h"
|
||||
#include "Common.h"
|
||||
|
||||
Config g_Config;
|
||||
|
||||
|
@ -117,48 +118,39 @@ int Config::CheckForDuplicateJoypads(bool OK)
|
|||
/////////////////////////////////////////////////////////////////////////
|
||||
// Notify the user about the multiple devices
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
int ReturnMessage;
|
||||
if(NumDuplicates > 0)
|
||||
{
|
||||
wxString ExtendedText;
|
||||
wxString MainText = wxString::Format(wxT(
|
||||
std::string ExtendedText;
|
||||
std::string MainText =
|
||||
"You have selected SaveByID for several identical joypads with the name '%s', because nJoy"
|
||||
" has no way of separating between them the settings for the last one will now be saved."
|
||||
" This may not be the settings you have intended to save. It is therefore recommended"
|
||||
" that you either unselect SaveByID for all but one of the identical joypads"
|
||||
" or disable them entirely."
|
||||
" If you are aware of this issue and want to keep the same settings for the identical"
|
||||
" pads you can ignore this message.")
|
||||
, joyinfo[joysticks[Duplicate].ID].Name);
|
||||
" pads you can ignore this message.";
|
||||
|
||||
if (OK) // We got here from the OK button
|
||||
{
|
||||
ExtendedText = wxString::Format(wxT(
|
||||
ExtendedText =
|
||||
"\n\n[Select 'OK' to return to the configuration window. Select 'Cancel' to ignore this"
|
||||
" message and close the configuration window and don't show this message again.]"));
|
||||
|
||||
ReturnMessage = wxMessageBox(wxString::Format
|
||||
(MainText + ExtendedText), wxT("Notice"),
|
||||
(wxOK | wxCANCEL) | wxICON_INFORMATION, 0, 100);
|
||||
if (ReturnMessage == wxCANCEL) g_Config.bSaveByIDNotice = false;
|
||||
" message and close the configuration window and don't show this message again.]";
|
||||
}
|
||||
else
|
||||
{
|
||||
ExtendedText = wxString::Format(wxT(
|
||||
"\n\n[Select 'Cancel' if you don't want to see this information again.]"));
|
||||
|
||||
ReturnMessage = wxMessageBox(wxString::Format
|
||||
(MainText + ExtendedText), wxT("Notice"),
|
||||
(wxOK | wxCANCEL) | wxICON_INFORMATION, 0, 100);
|
||||
if (ReturnMessage == wxCANCEL) g_Config.bSaveByIDNotice = false;
|
||||
ExtendedText =
|
||||
"\n\n[Select 'Cancel' if you don't want to see this information again.]";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ReturnMessage = -1;
|
||||
}
|
||||
|
||||
return ReturnMessage;
|
||||
//////////////////////////////////////
|
||||
bool ret = PanicYesNo((MainText + ExtendedText).c_str(), joyinfo[joysticks[Duplicate].ID].Name);
|
||||
|
||||
if (ret)
|
||||
g_Config.bSaveByIDNotice = false;
|
||||
|
||||
return ret ? 4 : 16;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
//#define USE_RUMBLE_DINPUT_HACK
|
||||
|
||||
#include <vector> // System
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <cmath>
|
||||
#include <SDL.h>
|
||||
|
||||
#include "Common.h" // Common
|
||||
|
@ -53,7 +54,6 @@
|
|||
#pragma comment(lib, "SDL.lib")
|
||||
#pragma comment(lib, "comctl32.lib")
|
||||
#include <tchar.h>
|
||||
#include <math.h>
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
|
|
@ -11,9 +11,12 @@ if not env['HAVE_SDL']:
|
|||
|
||||
files = [
|
||||
'nJoy.cpp',
|
||||
'GUI/AboutBox.cpp',
|
||||
'GUI/ConfigBox.cpp',
|
||||
]
|
||||
|
||||
if not env['HAVE_WX']
|
||||
files.Append('GUI/AboutBox.cpp',
|
||||
'GUI/ConfigBox.cpp',
|
||||
)
|
||||
|
||||
padenv = env.Clone()
|
||||
padenv.Append(
|
||||
|
|
|
@ -80,6 +80,7 @@ HRESULT SetDeviceForcesXY();
|
|||
bool CanRumble = false;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// wxWidgets
|
||||
// ¯¯¯¯¯¯¯¯¯
|
||||
|
@ -93,6 +94,7 @@ class wxDLLApp : public wxApp
|
|||
|
||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// DllMain
|
||||
|
@ -106,6 +108,7 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
|||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
//use wxInitialize() if you don't want GUI instead of the following 12 lines
|
||||
wxSetInstance((HINSTANCE)hinstDLL);
|
||||
int argc = 0;
|
||||
|
@ -114,11 +117,14 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
|||
|
||||
if ( !wxTheApp || !wxTheApp->CallOnInit() )
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -165,12 +171,13 @@ void DllConfig(HWND _hParent)
|
|||
|
||||
LoadConfig(); // load settings
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxWindow win;
|
||||
win.SetHWND(_hParent);
|
||||
ConfigBox frame(&win);
|
||||
frame.ShowModal();
|
||||
win.SetHWND(0);
|
||||
|
||||
#endif
|
||||
#else
|
||||
if(SDL_Init(SDL_INIT_JOYSTICK ) < 0)
|
||||
{
|
||||
|
@ -180,8 +187,10 @@ void DllConfig(HWND _hParent)
|
|||
|
||||
LoadConfig(); // load settings
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
ConfigBox frame(NULL);
|
||||
frame.ShowModal();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
#define SLEEP(x) Sleep(x)
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define SLEEP(x) usleep(x*1000)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue