mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Emulated Wiimote: Added game specific Wiimote cursor configuration. The IR pointer settings will be saved for the ISO id of the ISO that is loaded. This is necessary because there is no common way of treating the IR pointer positions. The IR data use a virtual resolution of 1024 x 768, but there is no consistency of where such a point is on the screen.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2314 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -16,11 +16,15 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "Common.h"
|
||||
#include "IniFile.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
#include "Config.h"
|
||||
#include "EmuDefinitions.h" // for PadMapping
|
||||
#include "main.h"
|
||||
|
||||
Config g_Config;
|
||||
|
||||
@ -38,7 +42,6 @@ void Config::Load(bool ChangePad)
|
||||
|
||||
// General
|
||||
iniFile.Get("Settings", "SidewaysDPad", &bSidewaysDPad, false);
|
||||
iniFile.Get("Settings", "WideScreen", &bWideScreen, false);
|
||||
iniFile.Get("Settings", "NunchuckConnected", &bNunchuckConnected, false);
|
||||
iniFile.Get("Settings", "ClassicControllerConnected", &bClassicControllerConnected, false);
|
||||
|
||||
@ -53,6 +56,14 @@ void Config::Load(bool ChangePad)
|
||||
iniFile.Get("Real", "AccNunNeutralY", &iAccNunNeutralY, 0);
|
||||
iniFile.Get("Real", "AccNunNeutralZ", &iAccNunNeutralZ, 0);
|
||||
|
||||
// Load the IR cursor settings if it's avaliable, if not load the default settings
|
||||
std::string TmpSection;
|
||||
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
|
||||
iniFile.Get(TmpSection.c_str(), "IRLeft", &iIRLeft, LEFT);
|
||||
iniFile.Get(TmpSection.c_str(), "IRTop", &iIRTop, TOP);
|
||||
iniFile.Get(TmpSection.c_str(), "IRWidth", &iIRWidth, RIGHT - LEFT);
|
||||
iniFile.Get(TmpSection.c_str(), "IRHeight", &iIRHeight, BOTTOM - TOP);
|
||||
|
||||
// Default controls
|
||||
#ifdef _WIN32
|
||||
int WmA = 65, WmB = 66,
|
||||
@ -160,7 +171,6 @@ void Config::Save(int Slot)
|
||||
IniFile iniFile;
|
||||
iniFile.Load(FULL_CONFIG_DIR "Wiimote.ini");
|
||||
iniFile.Set("Settings", "SidewaysDPad", bSidewaysDPad);
|
||||
iniFile.Set("Settings", "WideScreen", bWideScreen);
|
||||
iniFile.Set("Settings", "NunchuckConnected", bNunchuckConnected);
|
||||
iniFile.Set("Settings", "ClassicControllerConnected", bClassicControllerConnected);
|
||||
|
||||
@ -174,6 +184,13 @@ void Config::Save(int Slot)
|
||||
iniFile.Set("Real", "AccNunNeutralY", iAccNunNeutralY);
|
||||
iniFile.Set("Real", "AccNunNeutralZ", iAccNunNeutralZ);
|
||||
|
||||
// Save the IR cursor settings if it's avaliable, if not save the default settings
|
||||
std::string TmpSection;
|
||||
if (g_ISOId) TmpSection = Hex2Ascii(g_ISOId); else TmpSection = "Emulated";
|
||||
iniFile.Set(TmpSection.c_str(), "IRLeft", iIRLeft);
|
||||
iniFile.Set(TmpSection.c_str(), "IRTop", iIRTop);
|
||||
iniFile.Set(TmpSection.c_str(), "IRWidth", iIRWidth);
|
||||
iniFile.Set(TmpSection.c_str(), "IRHeight", iIRHeight);
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user