mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
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 "Globals.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "GLUtil.h"
|
#include "GLUtil.h"
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void DoDllDebugger()
|
|||||||
//m_frame->Show();
|
//m_frame->Show();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void DllDebugger(HWND _hParent) { }
|
void DllDebugger(HWND _hParent, bool Show) { }
|
||||||
void DoDllDebugger() { }
|
void DoDllDebugger() { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
// Include
|
// Include
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯
|
||||||
#include "nJoy.h"
|
#include "nJoy.h"
|
||||||
|
#include "Common.h"
|
||||||
|
|
||||||
Config g_Config;
|
Config g_Config;
|
||||||
|
|
||||||
@ -117,48 +118,39 @@ int Config::CheckForDuplicateJoypads(bool OK)
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// Notify the user about the multiple devices
|
// Notify the user about the multiple devices
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||||
int ReturnMessage;
|
|
||||||
if(NumDuplicates > 0)
|
if(NumDuplicates > 0)
|
||||||
{
|
{
|
||||||
wxString ExtendedText;
|
std::string ExtendedText;
|
||||||
wxString MainText = wxString::Format(wxT(
|
std::string MainText =
|
||||||
"You have selected SaveByID for several identical joypads with the name '%s', because nJoy"
|
"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."
|
" 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"
|
" 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"
|
" that you either unselect SaveByID for all but one of the identical joypads"
|
||||||
" or disable them entirely."
|
" or disable them entirely."
|
||||||
" If you are aware of this issue and want to keep the same settings for the identical"
|
" If you are aware of this issue and want to keep the same settings for the identical"
|
||||||
" pads you can ignore this message.")
|
" pads you can ignore this message.";
|
||||||
, joyinfo[joysticks[Duplicate].ID].Name);
|
|
||||||
if (OK) // We got here from the OK button
|
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"
|
"\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.]"));
|
" 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;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ExtendedText = wxString::Format(wxT(
|
ExtendedText =
|
||||||
"\n\n[Select 'Cancel' if you don't want to see this information again.]"));
|
"\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;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
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
|
//#define USE_RUMBLE_DINPUT_HACK
|
||||||
|
|
||||||
#include <vector> // System
|
#include <vector> // System
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <time.h>
|
#include <ctime>
|
||||||
|
#include <cmath>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "Common.h" // Common
|
#include "Common.h" // Common
|
||||||
@ -53,7 +54,6 @@
|
|||||||
#pragma comment(lib, "SDL.lib")
|
#pragma comment(lib, "SDL.lib")
|
||||||
#pragma comment(lib, "comctl32.lib")
|
#pragma comment(lib, "comctl32.lib")
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <math.h>
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
#define DIRECTINPUT_VERSION 0x0800
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -11,9 +11,12 @@ if not env['HAVE_SDL']:
|
|||||||
|
|
||||||
files = [
|
files = [
|
||||||
'nJoy.cpp',
|
'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 = env.Clone()
|
||||||
padenv.Append(
|
padenv.Append(
|
||||||
|
@ -80,6 +80,7 @@ HRESULT SetDeviceForcesXY();
|
|||||||
bool CanRumble = false;
|
bool CanRumble = false;
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// wxWidgets
|
// wxWidgets
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯
|
||||||
@ -93,6 +94,7 @@ class wxDLLApp : public wxApp
|
|||||||
|
|
||||||
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
|
||||||
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// DllMain
|
// DllMain
|
||||||
@ -106,6 +108,7 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
|||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
//use wxInitialize() if you don't want GUI instead of the following 12 lines
|
//use wxInitialize() if you don't want GUI instead of the following 12 lines
|
||||||
wxSetInstance((HINSTANCE)hinstDLL);
|
wxSetInstance((HINSTANCE)hinstDLL);
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
@ -114,11 +117,14 @@ BOOL APIENTRY DllMain( HINSTANCE hinstDLL, // DLL module handle
|
|||||||
|
|
||||||
if ( !wxTheApp || !wxTheApp->CallOnInit() )
|
if ( !wxTheApp || !wxTheApp->CallOnInit() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
|
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -165,12 +171,13 @@ void DllConfig(HWND _hParent)
|
|||||||
|
|
||||||
LoadConfig(); // load settings
|
LoadConfig(); // load settings
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
wxWindow win;
|
wxWindow win;
|
||||||
win.SetHWND(_hParent);
|
win.SetHWND(_hParent);
|
||||||
ConfigBox frame(&win);
|
ConfigBox frame(&win);
|
||||||
frame.ShowModal();
|
frame.ShowModal();
|
||||||
win.SetHWND(0);
|
win.SetHWND(0);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
if(SDL_Init(SDL_INIT_JOYSTICK ) < 0)
|
if(SDL_Init(SDL_INIT_JOYSTICK ) < 0)
|
||||||
{
|
{
|
||||||
@ -180,8 +187,10 @@ void DllConfig(HWND _hParent)
|
|||||||
|
|
||||||
LoadConfig(); // load settings
|
LoadConfig(); // load settings
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
ConfigBox frame(NULL);
|
ConfigBox frame(NULL);
|
||||||
frame.ShowModal();
|
frame.ShowModal();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
#define SLEEP(x) Sleep(x)
|
#define SLEEP(x) Sleep(x)
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#define SLEEP(x) usleep(x*1000)
|
#define SLEEP(x) usleep(x*1000)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user