mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Conflicts fixed
This commit is contained in:
commit
a7057f5205
40 changed files with 1969 additions and 848 deletions
19
README.md
19
README.md
|
@ -1,12 +1,21 @@
|
|||
rpcs3
|
||||
RPCS3
|
||||
=====
|
||||
|
||||
PS3 emulator/debugger
|
||||
An open-source PlayStation 3 emulator/debugger written in C++.
|
||||
|
||||
The [FAQ](https://github.com/DHrpcs3/rpcs3/wiki/FAQ) has some basic information.
|
||||
You can find some basic information in the [FAQ](https://github.com/DHrpcs3/rpcs3/wiki/FAQ). For discussion about this emulator and PS3 emulation please visit the [official forums](http://www.emunewz.net/forum/forumdisplay.php?fid=162).
|
||||
|
||||
For discussion about the emulator and PS3 emulation please visit the [official forums](http://www.emunewz.net/forum/forumdisplay.php?fid=162).
|
||||
### Dependencies
|
||||
|
||||
If you want to contribute please take a took at the [Coding Style](https://github.com/DHrpcs3/rpcs3/wiki/Coding-Style) and [Roadmap](https://github.com/DHrpcs3/rpcs3/wiki/Roadmap) pages.
|
||||
* [Visual C++ Redistributable Packages for Visual Studio 2013](http://www.microsoft.com/en-us/download/details.aspx?id=40784)
|
||||
* [OpenAL32.dll](http://www.mediafire.com/?nwt3ilty2mo)
|
||||
|
||||
### Development
|
||||
|
||||
If you want to contribute please take a took at the [Coding Style](https://github.com/DHrpcs3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/DHrpcs3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/DHrpcs3/rpcs3/wiki/Developer-Information) pages. You should as well contact any of the developers in the forum in order to know about the current situation of the emulator.
|
||||
|
||||
### Building
|
||||
|
||||
To initialize the repository don't forget to execute `git submodule update --init` to pull the wxWidgets source.
|
||||
* __Windows__: Install *Visual Studio 2013*. Then open the *.SLN* file, and press *Build* > *Rebuild Solution*.
|
||||
* __Linux__: *TODO*
|
||||
|
|
|
@ -142,9 +142,9 @@ public:
|
|||
return m_array[num];
|
||||
}
|
||||
|
||||
virtual u32 GetCount() const { return m_count; }
|
||||
u32 GetCount() const { return m_count; }
|
||||
|
||||
virtual void SetCount(const u32 count, bool memzero = true)
|
||||
void SetCount(const u32 count, bool memzero = true)
|
||||
{
|
||||
if(m_count >= count) return;
|
||||
|
||||
|
@ -199,96 +199,6 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
class ArrayString : public Array<char>
|
||||
{
|
||||
public:
|
||||
ArrayString() : Array()
|
||||
{
|
||||
}
|
||||
|
||||
ArrayString(const wxString& value) : Array()
|
||||
{
|
||||
*this = value;
|
||||
}
|
||||
|
||||
ArrayString(const char* value) : Array()
|
||||
{
|
||||
*this = value;
|
||||
}
|
||||
|
||||
virtual u32 GetCount() const
|
||||
{
|
||||
return m_array ? strlen(m_array) : 0;
|
||||
}
|
||||
|
||||
virtual void SetCount(const u32 count, bool memzero = true)
|
||||
{
|
||||
if(m_count && count < m_count - 1)
|
||||
{
|
||||
m_array[count] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
Array::SetCount(count + 1, memzero);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayString& operator = (const char* right)
|
||||
{
|
||||
Clear();
|
||||
|
||||
if(right)
|
||||
{
|
||||
size_t len = strlen(right);
|
||||
|
||||
if(len)
|
||||
{
|
||||
SetCount(len);
|
||||
memcpy(m_array, right, len * sizeof(char));
|
||||
m_array[len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
ArrayString& operator = (const ArrayString& right)
|
||||
{
|
||||
Clear();
|
||||
|
||||
if(size_t len = right.GetCount())
|
||||
{
|
||||
SetCount(len);
|
||||
memcpy(m_array, right.GetPtr(), len * sizeof(char));
|
||||
m_array[len] = '\0';
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
ArrayString& operator = (const wxString& right)
|
||||
{
|
||||
Clear();
|
||||
|
||||
if(size_t len = right.Len())
|
||||
{
|
||||
SetCount(len);
|
||||
memcpy(m_array, right.c_str(), len * sizeof(char));
|
||||
m_array[len] = '\0';
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
ArrayString* Clone() const
|
||||
{
|
||||
ArrayString* new_array = new ArrayString();
|
||||
(*new_array) = m_array;
|
||||
|
||||
return new_array;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T> struct Stack : public Array<T>
|
||||
{
|
||||
Stack() : Array<T>()
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
#include "stdafx.h"
|
||||
#include "StrFmt.h"
|
||||
|
||||
static const std::string fmt::placeholder = "???";
|
||||
extern const std::string fmt::placeholder = "???";
|
||||
|
||||
|
||||
//wrapper to deal with advance sprintf formating options with automatic length finding
|
||||
//can't take strings by reference because of "va_start", so overload it with char *
|
||||
std::string fmt::FormatV(const char *fmt, va_list args)
|
||||
{
|
||||
int length = 256;
|
||||
size_t length = 256;
|
||||
std::string str;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
std::vector<char> buffptr(length);
|
||||
size_t printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
||||
int printlen = vsnprintf(buffptr.data(), length, fmt, args);
|
||||
if (printlen >= 0 && printlen < length)
|
||||
{
|
||||
str = std::string(buffptr.data(), printlen);
|
||||
|
|
|
@ -78,13 +78,13 @@ namespace fmt{
|
|||
template<typename ... Args>
|
||||
string Format(const string &fmt, Args&& ... parameters)
|
||||
{
|
||||
int length = 256;
|
||||
size_t length = 256;
|
||||
string str;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
std::vector<char> buffptr(length);
|
||||
size_t printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
int printlen = snprintf(buffptr.data(), length, fmt.c_str(), std::forward<Args>(parameters)...);
|
||||
if (printlen >= 0 && printlen < length)
|
||||
{
|
||||
str = string(buffptr.data(), printlen);
|
||||
|
|
|
@ -622,8 +622,6 @@ bool CheckDebugSelf(const std::string& self, const std::string& elf)
|
|||
s.Seek(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
s.Close();
|
||||
}
|
||||
|
||||
bool DecryptSelf(const std::string& elf, const std::string& self)
|
||||
|
|
|
@ -2738,7 +2738,7 @@ private:
|
|||
{
|
||||
const u64 RA = CPU.GPR[ra];
|
||||
CPU.GPR[rd] = ~RA + CPU.XER.CA;
|
||||
CPU.XER.CA = (~RA + CPU.XER.CA > ~0x0) | ((RA == 0) & CPU.XER.CA);
|
||||
CPU.XER.CA = ((RA == 0) & CPU.XER.CA);
|
||||
if (oe) ConLog.Warning("subfzeo");
|
||||
if (rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
}
|
||||
|
|
|
@ -15,14 +15,20 @@ KeyboardManager::~KeyboardManager()
|
|||
|
||||
void KeyboardManager::Init(const u32 max_connect)
|
||||
{
|
||||
if(m_inited) return;
|
||||
if(m_inited)
|
||||
return;
|
||||
|
||||
// NOTE: Change these to std::make_unique assignments when C++14 comes out.
|
||||
switch(Ini.KeyboardHandlerMode.GetValue())
|
||||
{
|
||||
case 1: m_keyboard_handler = new WindowsKeyboardHandler(); break;
|
||||
case 1:
|
||||
m_keyboard_handler.reset(new WindowsKeyboardHandler());
|
||||
break;
|
||||
|
||||
default:
|
||||
case 0: m_keyboard_handler = new NullKeyboardHandler(); break;
|
||||
case 0:
|
||||
m_keyboard_handler.reset(new NullKeyboardHandler());
|
||||
break;
|
||||
}
|
||||
|
||||
m_keyboard_handler->Init(max_connect);
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "KeyboardHandler.h"
|
||||
|
||||
class KeyboardManager //: public wxWindow
|
||||
{
|
||||
bool m_inited;
|
||||
KeyboardHandlerBase* m_keyboard_handler;
|
||||
std::unique_ptr<KeyboardHandlerBase> m_keyboard_handler;
|
||||
|
||||
public:
|
||||
KeyboardManager();
|
||||
|
@ -14,9 +16,9 @@ public:
|
|||
void Init(const u32 max_connect);
|
||||
void Close();
|
||||
|
||||
Array<Keyboard>& GetKeyboards() { return m_keyboard_handler->GetKeyboards(); }
|
||||
std::vector<Keyboard>& GetKeyboards() { return m_keyboard_handler->GetKeyboards(); }
|
||||
KbInfo& GetInfo() { return m_keyboard_handler->GetInfo(); }
|
||||
Array<KbButton>& GetButtons(const u32 keyboard) { return m_keyboard_handler->GetButtons(keyboard); }
|
||||
std::vector<KbButton>& GetButtons(const u32 keyboard) { return m_keyboard_handler->GetButtons(keyboard); }
|
||||
CellKbData& GetData(const u32 keyboard) { return m_keyboard_handler->GetData(keyboard); }
|
||||
CellKbConfig& GetConfig(const u32 keyboard) { return m_keyboard_handler->GetConfig(keyboard); }
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
extern u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode); // (TODO: Can it be problematic to place SysCalls in middle of nowhere?)
|
||||
|
||||
enum KbPortStatus
|
||||
|
@ -248,22 +250,20 @@ struct Keyboard
|
|||
{
|
||||
CellKbData m_data;
|
||||
CellKbConfig m_config;
|
||||
Array<KbButton> m_buttons;
|
||||
std::vector<KbButton> m_buttons;
|
||||
|
||||
Keyboard()
|
||||
: m_data()
|
||||
, m_config()
|
||||
{
|
||||
}
|
||||
|
||||
~Keyboard() { m_buttons.Clear(); }
|
||||
};
|
||||
|
||||
class KeyboardHandlerBase
|
||||
{
|
||||
protected:
|
||||
KbInfo m_info;
|
||||
Array<Keyboard> m_keyboards;
|
||||
std::vector<Keyboard> m_keyboards;
|
||||
|
||||
public:
|
||||
virtual void Init(const u32 max_connect)=0;
|
||||
|
@ -271,22 +271,22 @@ public:
|
|||
|
||||
void Key(const u32 code, bool pressed)
|
||||
{
|
||||
for(u64 p=0; p<GetKeyboards().GetCount(); ++p)
|
||||
for(Keyboard& keyboard : m_keyboards)
|
||||
{
|
||||
for(u64 b=0; b<GetButtons(p).GetCount(); b++)
|
||||
for(KbButton& button : keyboard.m_buttons)
|
||||
{
|
||||
KbButton& button = GetButtons(p).Get(b);
|
||||
if(button.m_keyCode != code) continue;
|
||||
if(button.m_keyCode != code)
|
||||
continue;
|
||||
|
||||
CellKbData& data = GetKeyboards()[p].m_data;
|
||||
CellKbConfig& config = GetKeyboards()[p].m_config;
|
||||
CellKbData& data = keyboard.m_data;
|
||||
CellKbConfig& config = keyboard.m_config;
|
||||
|
||||
if (pressed)
|
||||
{
|
||||
|
||||
// Meta Keys
|
||||
if (code == 308 || code == 307 || code == 306 ||
|
||||
code == 393 || code == 396 || code == 394)
|
||||
{ // Meta Keys
|
||||
code == 393 || code == 396 || code == 394)
|
||||
{
|
||||
data.mkey |= button.m_outKeyCode;
|
||||
}
|
||||
else
|
||||
|
@ -312,9 +312,10 @@ public:
|
|||
|
||||
if (!pressed)
|
||||
{
|
||||
// Meta Keys
|
||||
if (code == 308 || code == 307 || code == 306 ||
|
||||
code == 393 || code == 396 || code == 394)
|
||||
{ // Meta Keys
|
||||
code == 393 || code == 396 || code == 394)
|
||||
{
|
||||
data.mkey &= ~button.m_outKeyCode;
|
||||
}
|
||||
}
|
||||
|
@ -324,8 +325,8 @@ public:
|
|||
}
|
||||
|
||||
KbInfo& GetInfo() { return m_info; }
|
||||
Array<Keyboard>& GetKeyboards() { return m_keyboards; }
|
||||
Array<KbButton>& GetButtons(const u32 keyboard) { return GetKeyboards()[keyboard].m_buttons; }
|
||||
CellKbData& GetData(const u32 keyboard) { return GetKeyboards()[keyboard].m_data; }
|
||||
CellKbConfig& GetConfig(const u32 keyboard) { return GetKeyboards()[keyboard].m_config; }
|
||||
std::vector<Keyboard>& GetKeyboards() { return m_keyboards; }
|
||||
std::vector<KbButton>& GetButtons(const u32 keyboard) { return m_keyboards[keyboard].m_buttons; }
|
||||
CellKbData& GetData(const u32 keyboard) { return m_keyboards[keyboard].m_data; }
|
||||
CellKbConfig& GetConfig(const u32 keyboard) { return m_keyboards[keyboard].m_config; }
|
||||
};
|
|
@ -15,14 +15,20 @@ MouseManager::~MouseManager()
|
|||
|
||||
void MouseManager::Init(const u32 max_connect)
|
||||
{
|
||||
if(m_inited) return;
|
||||
if(m_inited)
|
||||
return;
|
||||
|
||||
// NOTE: Change these to std::make_unique assignments when C++14 is available.
|
||||
switch(Ini.MouseHandlerMode.GetValue())
|
||||
{
|
||||
case 1: m_mouse_handler = new WindowsMouseHandler(); break;
|
||||
case 1:
|
||||
m_mouse_handler.reset(new WindowsMouseHandler());
|
||||
break;
|
||||
|
||||
default:
|
||||
case 0: m_mouse_handler = new NullMouseHandler(); break;
|
||||
case 0:
|
||||
m_mouse_handler.reset(new NullMouseHandler());
|
||||
break;
|
||||
}
|
||||
|
||||
m_mouse_handler->Init(max_connect);
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "MouseHandler.h"
|
||||
|
||||
class MouseManager //: public wxWindow
|
||||
{
|
||||
bool m_inited;
|
||||
MouseHandlerBase* m_mouse_handler;
|
||||
std::unique_ptr<MouseHandlerBase> m_mouse_handler;
|
||||
|
||||
public:
|
||||
MouseManager();
|
||||
|
@ -14,7 +16,7 @@ public:
|
|||
void Init(const u32 max_connect);
|
||||
void Close();
|
||||
|
||||
Array<Mouse>& GetMice() { return m_mouse_handler->GetMice(); }
|
||||
std::vector<Mouse>& GetMice() { return m_mouse_handler->GetMice(); }
|
||||
MouseInfo& GetInfo() { return m_mouse_handler->GetInfo(); }
|
||||
CellMouseData& GetData(const u32 mouse) { return m_mouse_handler->GetData(mouse); }
|
||||
CellMouseRawData& GetRawData(const u32 mouse) { return m_mouse_handler->GetRawData(mouse); }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
enum MousePortStatus
|
||||
{
|
||||
CELL_MOUSE_STATUS_DISCONNECTED = 0x00000000,
|
||||
|
@ -99,7 +101,7 @@ class MouseHandlerBase
|
|||
{
|
||||
protected:
|
||||
MouseInfo m_info;
|
||||
Array<Mouse> m_mice;
|
||||
std::vector<Mouse> m_mice;
|
||||
|
||||
public:
|
||||
virtual void Init(const u32 max_connect)=0;
|
||||
|
@ -107,7 +109,7 @@ public:
|
|||
|
||||
void Button(u8 button, bool pressed)
|
||||
{
|
||||
for(u64 p=0; p<GetMice().GetCount(); ++p)
|
||||
for(u64 p=0; p < m_mice.size(); ++p)
|
||||
{
|
||||
if (m_info.status[p] == CELL_MOUSE_STATUS_CONNECTED)
|
||||
{
|
||||
|
@ -121,7 +123,7 @@ public:
|
|||
|
||||
void Scroll(const s8 rotation)
|
||||
{
|
||||
for(u64 p=0; p<GetMice().GetCount(); ++p)
|
||||
for(u64 p=0; p < m_mice.size(); ++p)
|
||||
{
|
||||
if (m_info.status[p] == CELL_MOUSE_STATUS_CONNECTED)
|
||||
{
|
||||
|
@ -134,17 +136,17 @@ public:
|
|||
|
||||
void Move(const s16 x_pos_new, const s16 y_pos_new)
|
||||
{
|
||||
for(u64 p=0; p<GetMice().GetCount(); ++p)
|
||||
for(u64 p=0; p< m_mice.size(); ++p)
|
||||
{
|
||||
if (m_info.status[p] == CELL_MOUSE_STATUS_CONNECTED)
|
||||
{
|
||||
CellMouseData& data = GetData(p);
|
||||
data.update = CELL_MOUSE_DATA_UPDATE;
|
||||
data.x_axis += x_pos_new - GetMice()[p].x_pos;
|
||||
data.y_axis += y_pos_new - GetMice()[p].y_pos;
|
||||
data.x_axis += x_pos_new - m_mice[p].x_pos;
|
||||
data.y_axis += y_pos_new - m_mice[p].y_pos;
|
||||
|
||||
GetMice()[p].x_pos = x_pos_new;
|
||||
GetMice()[p].y_pos = y_pos_new;
|
||||
m_mice[p].x_pos = x_pos_new;
|
||||
m_mice[p].y_pos = y_pos_new;
|
||||
|
||||
/*CellMouseRawData& rawdata = GetRawData(p);
|
||||
rawdata.data[rawdata.len % CELL_MOUSE_MAX_CODES] = 0; // (TODO)
|
||||
|
@ -154,7 +156,7 @@ public:
|
|||
}
|
||||
|
||||
MouseInfo& GetInfo() { return m_info; }
|
||||
Array<Mouse>& GetMice() { return m_mice; }
|
||||
CellMouseData& GetData(const u32 mouse) { return GetMice()[mouse].m_data; }
|
||||
CellMouseRawData& GetRawData(const u32 mouse) { return GetMice()[mouse].m_rawdata; }
|
||||
std::vector<Mouse>& GetMice() { return m_mice; }
|
||||
CellMouseData& GetData(const u32 mouse) { return m_mice[mouse].m_data; }
|
||||
CellMouseRawData& GetRawData(const u32 mouse) { return m_mice[mouse].m_rawdata; }
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Emu/Io/KeyboardHandler.h"
|
||||
|
||||
class NullKeyboardHandler : public KeyboardHandlerBase
|
||||
class NullKeyboardHandler final : public KeyboardHandlerBase
|
||||
{
|
||||
public:
|
||||
NullKeyboardHandler()
|
||||
|
@ -13,16 +13,16 @@ public:
|
|||
{
|
||||
memset(&m_info, 0, sizeof(KbInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_keyboards.Clear();
|
||||
m_keyboards.clear();
|
||||
for(u32 i=0; i<max_connect; i++)
|
||||
{
|
||||
m_keyboards.Move(new Keyboard());
|
||||
m_keyboards.emplace_back(Keyboard());
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(KbInfo));
|
||||
m_keyboards.Clear();
|
||||
m_keyboards.clear();
|
||||
}
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Emu/Io/MouseHandler.h"
|
||||
|
||||
class NullMouseHandler : public MouseHandlerBase
|
||||
class NullMouseHandler final : public MouseHandlerBase
|
||||
{
|
||||
public:
|
||||
NullMouseHandler()
|
||||
|
@ -13,12 +13,12 @@ public:
|
|||
{
|
||||
memset(&m_info, 0, sizeof(MouseInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_mice.Clear();
|
||||
m_mice.clear();
|
||||
}
|
||||
|
||||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(MouseInfo));
|
||||
m_mice.Clear();
|
||||
m_mice.clear();
|
||||
}
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Emu/Io/PadHandler.h"
|
||||
|
||||
class NullPadHandler : public PadHandlerBase
|
||||
class NullPadHandler final : public PadHandlerBase
|
||||
{
|
||||
public:
|
||||
NullPadHandler()
|
||||
|
@ -13,12 +13,12 @@ public:
|
|||
{
|
||||
memset(&m_info, 0, sizeof(PadInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_pads.Clear();
|
||||
m_pads.clear();
|
||||
}
|
||||
|
||||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(PadInfo));
|
||||
m_pads.Clear();
|
||||
m_pads.clear();
|
||||
}
|
||||
};
|
|
@ -15,14 +15,20 @@ PadManager::~PadManager()
|
|||
|
||||
void PadManager::Init(const u32 max_connect)
|
||||
{
|
||||
if(m_inited) return;
|
||||
if(m_inited)
|
||||
return;
|
||||
|
||||
// NOTE: Change these to std::make_unique assignments when C++14 is available.
|
||||
switch(Ini.PadHandlerMode.GetValue())
|
||||
{
|
||||
case 1: m_pad_handler = new WindowsPadHandler(); break;
|
||||
case 1:
|
||||
m_pad_handler.reset(new WindowsPadHandler());
|
||||
break;
|
||||
|
||||
default:
|
||||
case 0: m_pad_handler = new NullPadHandler(); break;
|
||||
case 0:
|
||||
m_pad_handler.reset(new NullPadHandler());
|
||||
break;
|
||||
}
|
||||
|
||||
m_pad_handler->Init(max_connect);
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "PadHandler.h"
|
||||
|
||||
class PadManager //: public wxWindow
|
||||
{
|
||||
bool m_inited;
|
||||
PadHandlerBase* m_pad_handler;
|
||||
std::unique_ptr<PadHandlerBase> m_pad_handler;
|
||||
|
||||
public:
|
||||
PadManager();
|
||||
|
@ -14,9 +16,9 @@ public:
|
|||
void Init(const u32 max_connect);
|
||||
void Close();
|
||||
|
||||
Array<Pad>& GetPads() { return m_pad_handler->GetPads(); }
|
||||
std::vector<Pad>& GetPads() { return m_pad_handler->GetPads(); }
|
||||
PadInfo& GetInfo() { return m_pad_handler->GetInfo(); }
|
||||
Array<Button>& GetButtons(const u32 pad) { return m_pad_handler->GetButtons(pad); }
|
||||
std::vector<Button>& GetButtons(const u32 pad) { return m_pad_handler->GetButtons(pad); }
|
||||
|
||||
bool IsInited() const { return m_inited; }
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
enum PortStatus
|
||||
{
|
||||
CELL_PAD_STATUS_DISCONNECTED = 0x00000000,
|
||||
|
@ -128,8 +130,8 @@ struct Pad
|
|||
u32 m_device_capability;
|
||||
u32 m_device_type;
|
||||
|
||||
Array<Button> m_buttons;
|
||||
Array<AnalogStick> m_sticks;
|
||||
std::vector<Button> m_buttons;
|
||||
std::vector<AnalogStick> m_sticks;
|
||||
|
||||
s16 m_analog_left_x;
|
||||
s16 m_analog_left_y;
|
||||
|
@ -184,8 +186,6 @@ struct Pad
|
|||
, m_sensor_g(0)
|
||||
{
|
||||
}
|
||||
|
||||
~Pad() { m_buttons.Clear(); m_sticks.Clear(); }
|
||||
};
|
||||
|
||||
struct PadInfo
|
||||
|
@ -199,7 +199,7 @@ class PadHandlerBase
|
|||
{
|
||||
protected:
|
||||
PadInfo m_info;
|
||||
Array<Pad> m_pads;
|
||||
std::vector<Pad> m_pads;
|
||||
|
||||
public:
|
||||
virtual void Init(const u32 max_connect)=0;
|
||||
|
@ -207,14 +207,14 @@ public:
|
|||
|
||||
void Key(const u32 code, bool pressed)
|
||||
{
|
||||
for(u64 p=0; p<GetPads().GetCount(); ++p)
|
||||
for(Pad& pad : m_pads)
|
||||
{
|
||||
for(u64 b=0; b<GetButtons(p).GetCount(); b++)
|
||||
for(Button& button : pad.m_buttons)
|
||||
{
|
||||
Button& button = GetButtons(p).Get(b);
|
||||
if(button.m_keyCode != code) continue;
|
||||
if(button.m_keyCode != code)
|
||||
continue;
|
||||
|
||||
GetPads()[p].m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
|
||||
pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
|
||||
|
||||
if(button.m_pressed && !pressed)
|
||||
{
|
||||
|
@ -225,12 +225,13 @@ public:
|
|||
button.m_pressed = pressed;
|
||||
}
|
||||
}
|
||||
for(u32 s = 0; s < GetSticks(p).GetCount(); s++)
|
||||
{
|
||||
AnalogStick& stick = GetSticks(p).Get(s);
|
||||
if (stick.m_keyCodeMax != code && stick.m_keyCodeMin != code) continue;
|
||||
|
||||
GetPads()[p].m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
|
||||
for(AnalogStick& stick : pad.m_sticks)
|
||||
{
|
||||
if (stick.m_keyCodeMax != code && stick.m_keyCodeMin != code)
|
||||
continue;
|
||||
|
||||
pad.m_port_status |= CELL_PAD_STATUS_ASSIGN_CHANGES;
|
||||
|
||||
if (stick.m_keyCodeMax == code)
|
||||
{
|
||||
|
@ -247,7 +248,7 @@ public:
|
|||
}
|
||||
|
||||
PadInfo& GetInfo() { return m_info; }
|
||||
Array<Pad>& GetPads() { return m_pads; }
|
||||
Array<Button>& GetButtons(const u32 pad) { return GetPads()[pad].m_buttons; }
|
||||
Array<AnalogStick>& GetSticks(const u32 pad) { return GetPads()[pad].m_sticks; }
|
||||
std::vector<Pad>& GetPads() { return m_pads; }
|
||||
std::vector<Button>& GetButtons(const u32 pad) { return m_pads[pad].m_buttons; }
|
||||
std::vector<AnalogStick>& GetSticks(const u32 pad) { return m_pads[pad].m_sticks; }
|
||||
};
|
|
@ -1,8 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include "Emu/Io/KeyboardHandler.h"
|
||||
|
||||
class WindowsKeyboardHandler
|
||||
class WindowsKeyboardHandler final
|
||||
: public wxWindow
|
||||
, public KeyboardHandlerBase
|
||||
{
|
||||
|
@ -22,12 +24,13 @@ public:
|
|||
{
|
||||
for(u32 i=0; i<max_connect; i++)
|
||||
{
|
||||
m_keyboards.Move(new Keyboard());
|
||||
m_keyboards.emplace_back(Keyboard());
|
||||
}
|
||||
|
||||
LoadSettings();
|
||||
memset(&m_info, 0, sizeof(KbInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_info.now_connect = min<int>(GetKeyboards().GetCount(), max_connect);
|
||||
m_info.now_connect = std::min<size_t>(m_keyboards.size(), max_connect);
|
||||
m_info.info = 0; // Ownership of keyboard data: 0=Application, 1=System
|
||||
m_info.status[0] = CELL_KB_STATUS_CONNECTED; // (TODO: Support for more keyboards)
|
||||
}
|
||||
|
@ -35,139 +38,139 @@ public:
|
|||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(KbInfo));
|
||||
m_keyboards.Clear();
|
||||
m_keyboards.clear();
|
||||
}
|
||||
|
||||
void LoadSettings()
|
||||
{
|
||||
// Meta Keys
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_CONTROL, CELL_KB_MKEY_L_CTRL));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_SHIFT, CELL_KB_MKEY_L_SHIFT));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_ALT, CELL_KB_MKEY_L_ALT));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_WINDOWS_LEFT, CELL_KB_MKEY_L_WIN));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_COMMAND, CELL_KB_MKEY_L_WIN));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KB_MKEY_R_CTRL));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KB_MKEY_R_SHIFT));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KB_MKEY_R_ALT));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_WINDOWS_RIGHT, CELL_KB_MKEY_R_WIN));
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_CONTROL, CELL_KB_MKEY_L_CTRL);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SHIFT, CELL_KB_MKEY_L_SHIFT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_ALT, CELL_KB_MKEY_L_ALT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_LEFT, CELL_KB_MKEY_L_WIN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_COMMAND, CELL_KB_MKEY_L_WIN);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_CTRL);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_SHIFT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_ALT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_RIGHT, CELL_KB_MKEY_R_WIN);
|
||||
|
||||
// CELL_KB_RAWDAT
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_NO_EVENT));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_E_ROLLOVER));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_E_POSTFAIL));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_E_UNDEF));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_ESCAPE, CELL_KEYC_ESCAPE));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_106_KANJI));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_CAPITAL, CELL_KEYC_CAPS_LOCK));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F1, CELL_KEYC_F1));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F2, CELL_KEYC_F2));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F3, CELL_KEYC_F3));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F4, CELL_KEYC_F4));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F5, CELL_KEYC_F5));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F6, CELL_KEYC_F6));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F7, CELL_KEYC_F7));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F8, CELL_KEYC_F8));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F9, CELL_KEYC_F9));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F10, CELL_KEYC_F10));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F11, CELL_KEYC_F11));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_F12, CELL_KEYC_F12));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_PRINT, CELL_KEYC_PRINTSCREEN));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_SCROLL, CELL_KEYC_SCROLL_LOCK));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_PAUSE, CELL_KEYC_PAUSE));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_INSERT, CELL_KEYC_INSERT));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_HOME));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_PAGEUP, CELL_KEYC_PAGE_UP));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_DELETE, CELL_KEYC_DELETE));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_END, CELL_KEYC_END));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_PAGEDOWN, CELL_KEYC_PAGE_DOWN));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_RIGHT, CELL_KEYC_RIGHT_ARROW));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_LEFT, CELL_KEYC_LEFT_ARROW));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_DOWN, CELL_KEYC_DOWN_ARROW));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_UP, CELL_KEYC_UP_ARROW));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_APPLICATION));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_KANA));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_HENKAN));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_MUHENKAN));
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_NO_EVENT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_ROLLOVER);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_POSTFAIL);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_UNDEF);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_ESCAPE, CELL_KEYC_ESCAPE);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_106_KANJI);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_CAPITAL, CELL_KEYC_CAPS_LOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F1, CELL_KEYC_F1);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F2, CELL_KEYC_F2);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F3, CELL_KEYC_F3);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F4, CELL_KEYC_F4);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F5, CELL_KEYC_F5);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F6, CELL_KEYC_F6);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F7, CELL_KEYC_F7);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F8, CELL_KEYC_F8);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F9, CELL_KEYC_F9);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F10, CELL_KEYC_F10);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F11, CELL_KEYC_F11);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F12, CELL_KEYC_F12);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PRINT, CELL_KEYC_PRINTSCREEN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SCROLL, CELL_KEYC_SCROLL_LOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAUSE, CELL_KEYC_PAUSE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_INSERT, CELL_KEYC_INSERT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HOME);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEUP, CELL_KEYC_PAGE_UP);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_DELETE, CELL_KEYC_DELETE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_END, CELL_KEYC_END);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEDOWN, CELL_KEYC_PAGE_DOWN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_RIGHT, CELL_KEYC_RIGHT_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_LEFT, CELL_KEYC_LEFT_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_DOWN, CELL_KEYC_DOWN_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_UP, CELL_KEYC_UP_ARROW);
|
||||
//m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_APPLICATION);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_KANA);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HENKAN);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_MUHENKAN);
|
||||
|
||||
// CELL_KB_KEYPAD
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMLOCK, CELL_KEYC_KPAD_NUMLOCK));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_DIVIDE, CELL_KEYC_KPAD_SLASH));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_MULTIPLY, CELL_KEYC_KPAD_ASTERISK));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_SUBTRACT, CELL_KEYC_KPAD_MINUS));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_ADD, CELL_KEYC_KPAD_PLUS));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_ENTER, CELL_KEYC_KPAD_ENTER));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD1, CELL_KEYC_KPAD_1));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD2, CELL_KEYC_KPAD_2));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD3, CELL_KEYC_KPAD_3));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD4, CELL_KEYC_KPAD_4));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD5, CELL_KEYC_KPAD_5));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD6, CELL_KEYC_KPAD_6));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD7, CELL_KEYC_KPAD_7));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD8, CELL_KEYC_KPAD_8));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD9, CELL_KEYC_KPAD_9));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD0, CELL_KEYC_KPAD_0));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_NUMPAD_DELETE, CELL_KEYC_KPAD_PERIOD));
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_KPAD_NUMLOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DIVIDE, CELL_KEYC_KPAD_SLASH);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_MULTIPLY, CELL_KEYC_KPAD_ASTERISK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_SUBTRACT, CELL_KEYC_KPAD_MINUS);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ADD, CELL_KEYC_KPAD_PLUS);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ENTER, CELL_KEYC_KPAD_ENTER);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD1, CELL_KEYC_KPAD_1);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD2, CELL_KEYC_KPAD_2);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD3, CELL_KEYC_KPAD_3);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD4, CELL_KEYC_KPAD_4);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD5, CELL_KEYC_KPAD_5);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD6, CELL_KEYC_KPAD_6);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD7, CELL_KEYC_KPAD_7);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD8, CELL_KEYC_KPAD_8);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD9, CELL_KEYC_KPAD_9);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD0, CELL_KEYC_KPAD_0);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DELETE, CELL_KEYC_KPAD_PERIOD);
|
||||
|
||||
// ASCII Printable characters
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('A', CELL_KEYC_A));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('B', CELL_KEYC_B));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('C', CELL_KEYC_C));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('D', CELL_KEYC_D));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('E', CELL_KEYC_E));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('F', CELL_KEYC_F));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('G', CELL_KEYC_G));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('H', CELL_KEYC_H));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('I', CELL_KEYC_I));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('J', CELL_KEYC_J));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('K', CELL_KEYC_K));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('L', CELL_KEYC_L));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('M', CELL_KEYC_M));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('N', CELL_KEYC_N));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('O', CELL_KEYC_O));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('P', CELL_KEYC_P));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('Q', CELL_KEYC_Q));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('R', CELL_KEYC_R));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('S', CELL_KEYC_S));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('T', CELL_KEYC_T));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('U', CELL_KEYC_U));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('V', CELL_KEYC_V));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('W', CELL_KEYC_W));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('X', CELL_KEYC_X));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('Y', CELL_KEYC_Y));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('Z', CELL_KEYC_Z));
|
||||
m_keyboards[0].m_buttons.emplace_back('A', CELL_KEYC_A);
|
||||
m_keyboards[0].m_buttons.emplace_back('B', CELL_KEYC_B);
|
||||
m_keyboards[0].m_buttons.emplace_back('C', CELL_KEYC_C);
|
||||
m_keyboards[0].m_buttons.emplace_back('D', CELL_KEYC_D);
|
||||
m_keyboards[0].m_buttons.emplace_back('E', CELL_KEYC_E);
|
||||
m_keyboards[0].m_buttons.emplace_back('F', CELL_KEYC_F);
|
||||
m_keyboards[0].m_buttons.emplace_back('G', CELL_KEYC_G);
|
||||
m_keyboards[0].m_buttons.emplace_back('H', CELL_KEYC_H);
|
||||
m_keyboards[0].m_buttons.emplace_back('I', CELL_KEYC_I);
|
||||
m_keyboards[0].m_buttons.emplace_back('J', CELL_KEYC_J);
|
||||
m_keyboards[0].m_buttons.emplace_back('K', CELL_KEYC_K);
|
||||
m_keyboards[0].m_buttons.emplace_back('L', CELL_KEYC_L);
|
||||
m_keyboards[0].m_buttons.emplace_back('M', CELL_KEYC_M);
|
||||
m_keyboards[0].m_buttons.emplace_back('N', CELL_KEYC_N);
|
||||
m_keyboards[0].m_buttons.emplace_back('O', CELL_KEYC_O);
|
||||
m_keyboards[0].m_buttons.emplace_back('P', CELL_KEYC_P);
|
||||
m_keyboards[0].m_buttons.emplace_back('Q', CELL_KEYC_Q);
|
||||
m_keyboards[0].m_buttons.emplace_back('R', CELL_KEYC_R);
|
||||
m_keyboards[0].m_buttons.emplace_back('S', CELL_KEYC_S);
|
||||
m_keyboards[0].m_buttons.emplace_back('T', CELL_KEYC_T);
|
||||
m_keyboards[0].m_buttons.emplace_back('U', CELL_KEYC_U);
|
||||
m_keyboards[0].m_buttons.emplace_back('V', CELL_KEYC_V);
|
||||
m_keyboards[0].m_buttons.emplace_back('W', CELL_KEYC_W);
|
||||
m_keyboards[0].m_buttons.emplace_back('X', CELL_KEYC_X);
|
||||
m_keyboards[0].m_buttons.emplace_back('Y', CELL_KEYC_Y);
|
||||
m_keyboards[0].m_buttons.emplace_back('Z', CELL_KEYC_Z);
|
||||
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('1', CELL_KEYC_1));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('2', CELL_KEYC_2));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('3', CELL_KEYC_3));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('4', CELL_KEYC_4));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('5', CELL_KEYC_5));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('6', CELL_KEYC_6));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('7', CELL_KEYC_7));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('8', CELL_KEYC_8));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('9', CELL_KEYC_9));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('0', CELL_KEYC_0));
|
||||
m_keyboards[0].m_buttons.emplace_back('1', CELL_KEYC_1);
|
||||
m_keyboards[0].m_buttons.emplace_back('2', CELL_KEYC_2);
|
||||
m_keyboards[0].m_buttons.emplace_back('3', CELL_KEYC_3);
|
||||
m_keyboards[0].m_buttons.emplace_back('4', CELL_KEYC_4);
|
||||
m_keyboards[0].m_buttons.emplace_back('5', CELL_KEYC_5);
|
||||
m_keyboards[0].m_buttons.emplace_back('6', CELL_KEYC_6);
|
||||
m_keyboards[0].m_buttons.emplace_back('7', CELL_KEYC_7);
|
||||
m_keyboards[0].m_buttons.emplace_back('8', CELL_KEYC_8);
|
||||
m_keyboards[0].m_buttons.emplace_back('9', CELL_KEYC_9);
|
||||
m_keyboards[0].m_buttons.emplace_back('0', CELL_KEYC_0);
|
||||
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_RETURN, CELL_KEYC_ENTER));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_ESC));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_TAB, CELL_KEYC_TAB));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_SPACE, CELL_KEYC_SPACE));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(WXK_SUBTRACT, CELL_KEYC_MINUS));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('=', CELL_KEYC_EQUAL_101));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('^', CELL_KEYC_ACCENT_CIRCONFLEX_106));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton('(', CELL_KEYC_LEFT_BRACKET_101));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('@', CELL_KEYC_ATMARK_106));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(')', CELL_KEYC_RIGHT_BRACKET_101));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('(', CELL_KEYC_LEFT_BRACKET_106));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_BACKSLASH_101));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('(', CELL_KEYC_RIGHT_BRACKET_106));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(';', CELL_KEYC_SEMICOLON));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('"', CELL_KEYC_QUOTATION_101));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(':', CELL_KEYC_COLON_106));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton(',', CELL_KEYC_COMMA));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('.', CELL_KEYC_PERIOD));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('/', CELL_KEYC_SLASH));
|
||||
m_keyboards[0].m_buttons.Move(new KbButton('\\', CELL_KEYC_BACKSLASH_106));
|
||||
//m_keyboards[0].m_buttons.Move(new KbButton(, CELL_KEYC_YEN_106));
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_RETURN, CELL_KEYC_ENTER);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_ESC);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_TAB, CELL_KEYC_TAB);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SPACE, CELL_KEYC_SPACE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SUBTRACT, CELL_KEYC_MINUS);
|
||||
m_keyboards[0].m_buttons.emplace_back('=', CELL_KEYC_EQUAL_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('^', CELL_KEYC_ACCENT_CIRCONFLEX_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('@', CELL_KEYC_ATMARK_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(')', CELL_KEYC_RIGHT_BRACKET_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_BACKSLASH_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_RIGHT_BRACKET_106);
|
||||
m_keyboards[0].m_buttons.emplace_back(';', CELL_KEYC_SEMICOLON);
|
||||
m_keyboards[0].m_buttons.emplace_back('"', CELL_KEYC_QUOTATION_101);
|
||||
m_keyboards[0].m_buttons.emplace_back(':', CELL_KEYC_COLON_106);
|
||||
m_keyboards[0].m_buttons.emplace_back(',', CELL_KEYC_COMMA);
|
||||
m_keyboards[0].m_buttons.emplace_back('.', CELL_KEYC_PERIOD);
|
||||
m_keyboards[0].m_buttons.emplace_back('/', CELL_KEYC_SLASH);
|
||||
m_keyboards[0].m_buttons.emplace_back('\\', CELL_KEYC_BACKSLASH_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_YEN_106);
|
||||
}
|
||||
};
|
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "Emu/Io/MouseHandler.h"
|
||||
|
||||
class WindowsMouseHandler
|
||||
class WindowsMouseHandler final
|
||||
: public wxWindow
|
||||
, public MouseHandlerBase
|
||||
{
|
||||
|
@ -28,7 +29,7 @@ public:
|
|||
else if (event.MiddleDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 1);
|
||||
event.Skip();
|
||||
}
|
||||
virtual void MouseButtonUp(wxMouseEvent& event)
|
||||
virtual void MouseButtonUp(wxMouseEvent& event)
|
||||
{
|
||||
if (event.LeftUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 0);
|
||||
else if (event.RightUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 0);
|
||||
|
@ -40,10 +41,10 @@ public:
|
|||
|
||||
virtual void Init(const u32 max_connect)
|
||||
{
|
||||
m_mice.Move(new Mouse());
|
||||
m_mice.emplace_back(Mouse());
|
||||
memset(&m_info, 0, sizeof(MouseInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_info.now_connect = min<int>(GetMice().GetCount(), max_connect);
|
||||
m_info.now_connect = std::min(m_mice.size(), (size_t)max_connect);
|
||||
m_info.info = 0; // Ownership of mouse data: 0=Application, 1=System
|
||||
m_info.status[0] = CELL_MOUSE_STATUS_CONNECTED; // (TODO: Support for more mice)
|
||||
for(u32 i=1; i<max_connect; i++) m_info.status[i] = CELL_MOUSE_STATUS_DISCONNECTED;
|
||||
|
@ -54,6 +55,6 @@ public:
|
|||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(MouseInfo));
|
||||
m_mice.Clear();
|
||||
m_mice.clear();
|
||||
}
|
||||
};
|
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "Emu/Io/PadHandler.h"
|
||||
|
||||
class WindowsPadHandler
|
||||
class WindowsPadHandler final
|
||||
: public wxWindow
|
||||
, public PadHandlerBase
|
||||
{
|
||||
|
@ -23,43 +24,43 @@ public:
|
|||
memset(&m_info, 0, sizeof(PadInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
LoadSettings();
|
||||
m_info.now_connect = min<int>(GetPads().GetCount(), max_connect);
|
||||
m_info.now_connect = std::min(m_pads.size(), (size_t)max_connect);
|
||||
}
|
||||
|
||||
virtual void Close()
|
||||
{
|
||||
memset(&m_info, 0, sizeof(PadInfo));
|
||||
m_pads.Clear();
|
||||
m_pads.clear();
|
||||
}
|
||||
|
||||
void LoadSettings()
|
||||
{
|
||||
m_pads.Move(new Pad(
|
||||
m_pads.emplace_back(
|
||||
CELL_PAD_STATUS_CONNECTED, CELL_PAD_SETTING_PRESS_ON | CELL_PAD_SETTING_SENSOR_OFF,
|
||||
CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE,
|
||||
CELL_PAD_DEV_TYPE_STANDARD));
|
||||
CELL_PAD_DEV_TYPE_STANDARD);
|
||||
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerLeft.GetValue()), CELL_PAD_CTRL_LEFT));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerDown.GetValue()), CELL_PAD_CTRL_DOWN));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerRight.GetValue()), CELL_PAD_CTRL_RIGHT));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerUp.GetValue()), CELL_PAD_CTRL_UP));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, WXK_RETURN, CELL_PAD_CTRL_START));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerR3.GetValue()), CELL_PAD_CTRL_R3));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, static_cast<char>(Ini.PadHandlerL3.GetValue()), CELL_PAD_CTRL_L3));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL1, WXK_SPACE, CELL_PAD_CTRL_SELECT));
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerLeft.GetValue(), CELL_PAD_CTRL_LEFT);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerDown.GetValue(), CELL_PAD_CTRL_DOWN);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerRight.GetValue(), CELL_PAD_CTRL_RIGHT);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerUp.GetValue(), CELL_PAD_CTRL_UP);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerStart.GetValue(), CELL_PAD_CTRL_START);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerR3.GetValue(), CELL_PAD_CTRL_R3);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerL3.GetValue(), CELL_PAD_CTRL_L3);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, Ini.PadHandlerSelect.GetValue(), CELL_PAD_CTRL_SELECT);
|
||||
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerSquare.GetValue()), CELL_PAD_CTRL_SQUARE));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerCross.GetValue()), CELL_PAD_CTRL_CROSS));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerCircle.GetValue()), CELL_PAD_CTRL_CIRCLE));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerTriangle.GetValue()), CELL_PAD_CTRL_TRIANGLE));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerR1.GetValue()), CELL_PAD_CTRL_R1));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerL1.GetValue()), CELL_PAD_CTRL_L1));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerR2.GetValue()), CELL_PAD_CTRL_R2));
|
||||
m_pads[0].m_buttons.Move(new Button(CELL_PAD_BTN_OFFSET_DIGITAL2, static_cast<char>(Ini.PadHandlerL2.GetValue()), CELL_PAD_CTRL_L2));
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerSquare.GetValue(), CELL_PAD_CTRL_SQUARE);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerCross.GetValue(), CELL_PAD_CTRL_CROSS);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerCircle.GetValue(), CELL_PAD_CTRL_CIRCLE);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerTriangle.GetValue(), CELL_PAD_CTRL_TRIANGLE);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerR1.GetValue(), CELL_PAD_CTRL_R1);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerL1.GetValue(), CELL_PAD_CTRL_L1);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerR2.GetValue(), CELL_PAD_CTRL_R2);
|
||||
m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, Ini.PadHandlerL2.GetValue(), CELL_PAD_CTRL_L2);
|
||||
|
||||
m_pads[0].m_sticks.Move(new AnalogStick(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X, WXK_LEFT, WXK_RIGHT));
|
||||
m_pads[0].m_sticks.Move(new AnalogStick(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y, WXK_UP, WXK_DOWN));
|
||||
m_pads[0].m_sticks.Move(new AnalogStick(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X, WXK_HOME, WXK_END));
|
||||
m_pads[0].m_sticks.Move(new AnalogStick(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y, WXK_PAGEUP, WXK_PAGEDOWN));
|
||||
m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X, Ini.PadHandlerLStickLeft.GetValue(), Ini.PadHandlerLStickRight.GetValue());
|
||||
m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y, Ini.PadHandlerLStickUp.GetValue(), Ini.PadHandlerLStickDown.GetValue());
|
||||
m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X, Ini.PadHandlerRStickLeft.GetValue(), Ini.PadHandlerRStickRight.GetValue());
|
||||
m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y, Ini.PadHandlerRStickUp.GetValue(), Ini.PadHandlerRStickDown.GetValue());
|
||||
}
|
||||
};
|
|
@ -3041,6 +3041,7 @@ s64 SysCalls::DoFunc(const u32 id)
|
|||
case 0xd9a4f812: FUNC_LOG_ERROR("TODO: atoff");
|
||||
case 0xda5a7eb8: FUNC_LOG_ERROR("TODO: strtoul");
|
||||
case 0xdaeada07: FUNC_LOG_ERROR("TODO: mallopt");
|
||||
case 0xdbf4c59c: FUNC_LOG_ERROR("TODO: cellPadGetCapabilityInfo");
|
||||
case 0xddbac025: FUNC_LOG_ERROR("TODO: strcasecmp_ascii");
|
||||
case 0xddc71a75: FUNC_LOG_ERROR("TODO: _SCE_Assert");
|
||||
case 0xde1bb092: FUNC_LOG_ERROR("TODO: init_by_array_TT800");
|
||||
|
|
|
@ -190,7 +190,7 @@ int cellRtcGetTick(mem_ptr_t<CellRtcDateTime> pTime, mem_ptr_t<CellRtcTick> pTic
|
|||
{
|
||||
cellRtc.Log("cellRtcGetTick(pTime=0x%x, pTick=0x%x)", pTime.GetAddr(), pTick.GetAddr());
|
||||
|
||||
if (!pTime.IsGood() || !pTime.IsGood())
|
||||
if (!pTime.IsGood() || !pTick.IsGood())
|
||||
return CELL_RTC_ERROR_INVALID_POINTER;
|
||||
|
||||
wxDateTime datetime = wxDateTime::wxDateTime(pTime->day, (wxDateTime::Month)pTime->month.ToLE(), pTime->year, pTime->hour, pTime->minute, pTime->second, (pTime->microsecond / 1000));
|
||||
|
@ -203,7 +203,7 @@ int cellRtcSetTick(mem_ptr_t<CellRtcDateTime> pTime, mem_ptr_t<CellRtcTick> pTic
|
|||
{
|
||||
cellRtc.Log("cellRtcSetTick(pTime=0x%x, pTick=0x%x)", pTime.GetAddr(), pTick.GetAddr());
|
||||
|
||||
if (!pTime.IsGood() || !pTime.IsGood())
|
||||
if (!pTime.IsGood() || !pTick.IsGood())
|
||||
return CELL_RTC_ERROR_INVALID_POINTER;
|
||||
|
||||
wxDateTime date = wxDateTime::wxDateTime((time_t)pTick->tick);
|
||||
|
|
|
@ -979,8 +979,8 @@ void cellSysutil_init()
|
|||
//cellSysutil.AddFunc(0xf6482036, cellSaveDataUserGetListItem);
|
||||
cellSysutil.AddFunc(0x2de0d663, cellSaveDataListSave2);
|
||||
cellSysutil.AddFunc(0x1dfbfdd6, cellSaveDataListLoad2);
|
||||
//cellSysutil.AddFunc(0x2aae9ef5, cellSaveDataFixedSave2);
|
||||
//cellSysutil.AddFunc(0x2a8eada2, cellSaveDataFixedLoad2);
|
||||
cellSysutil.AddFunc(0x2aae9ef5, cellSaveDataFixedSave2);
|
||||
cellSysutil.AddFunc(0x2a8eada2, cellSaveDataFixedLoad2);
|
||||
//cellSysutil.AddFunc(0x8b7ed64b, cellSaveDataAutoSave2);
|
||||
//cellSysutil.AddFunc(0xfbd5c856, cellSaveDataAutoLoad2);
|
||||
//cellSysutil.AddFunc(0x4dd03a4e, cellSaveDataListAutoSave);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "cellSysutil_SaveData.h"
|
||||
#include "Loader/PSF.h"
|
||||
#include "stblib/stb_image.h"
|
||||
|
||||
extern Module cellSysutil;
|
||||
|
||||
|
@ -16,7 +15,7 @@ class sortSaveDataEntry
|
|||
u32 sortOrder;
|
||||
public:
|
||||
sortSaveDataEntry(u32 type, u32 order) : sortType(type), sortOrder(order) {}
|
||||
bool operator()(const SaveDataListEntry& entry1, const SaveDataListEntry& entry2) const
|
||||
bool operator()(const SaveDataEntry& entry1, const SaveDataEntry& entry2) const
|
||||
{
|
||||
if (sortOrder == CELL_SAVEDATA_SORTORDER_DESCENT)
|
||||
{
|
||||
|
@ -54,7 +53,7 @@ u64 getSaveDataSize(const std::string& dirName)
|
|||
return totalSize;
|
||||
}
|
||||
|
||||
void addSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, const std::string& saveDir)
|
||||
void addSaveDataEntry(std::vector<SaveDataEntry>& saveEntries, const std::string& saveDir)
|
||||
{
|
||||
// PSF parameters
|
||||
vfsFile f(saveDir + "/PARAM.SFO");
|
||||
|
@ -64,10 +63,9 @@ void addSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, const std::st
|
|||
|
||||
// PNG icon
|
||||
std::string localPath;
|
||||
int width, height, actual_components;
|
||||
Emu.GetVFS().GetDevice(saveDir + "/ICON0.PNG", localPath);
|
||||
|
||||
SaveDataListEntry saveEntry;
|
||||
SaveDataEntry saveEntry;
|
||||
saveEntry.dirName = psf.GetString("SAVEDATA_DIRECTORY");
|
||||
saveEntry.listParam = psf.GetString("SAVEDATA_LIST_PARAM");
|
||||
saveEntry.title = psf.GetString("TITLE");
|
||||
|
@ -77,16 +75,16 @@ void addSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, const std::st
|
|||
saveEntry.st_atime_ = 0; // TODO
|
||||
saveEntry.st_mtime_ = 0; // TODO
|
||||
saveEntry.st_ctime_ = 0; // TODO
|
||||
saveEntry.iconBuf = stbi_load(localPath.c_str(), &width, &height, &actual_components, 3);
|
||||
saveEntry.iconBufSize = width * height * 3;
|
||||
saveEntry.iconBuf = NULL; // TODO: Here should be the PNG buffer
|
||||
saveEntry.iconBufSize = 0; // TODO: Size of the PNG file
|
||||
saveEntry.isNew = false;
|
||||
|
||||
saveEntries.push_back(saveEntry);
|
||||
}
|
||||
|
||||
void addNewSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, mem_ptr_t<CellSaveDataListNewData> newData)
|
||||
void addNewSaveDataEntry(std::vector<SaveDataEntry>& saveEntries, mem_ptr_t<CellSaveDataListNewData> newData)
|
||||
{
|
||||
SaveDataListEntry saveEntry;
|
||||
SaveDataEntry saveEntry;
|
||||
saveEntry.dirName = (char*)Memory.VirtualToRealAddr(newData->dirName_addr);
|
||||
saveEntry.title = (char*)Memory.VirtualToRealAddr(newData->icon->title_addr);
|
||||
saveEntry.subtitle = (char*)Memory.VirtualToRealAddr(newData->icon->title_addr);
|
||||
|
@ -98,15 +96,15 @@ void addNewSaveDataEntry(std::vector<SaveDataListEntry>& saveEntries, mem_ptr_t<
|
|||
saveEntries.push_back(saveEntry);
|
||||
}
|
||||
|
||||
u32 focusSaveDataEntry(const std::vector<SaveDataListEntry>& saveEntries, u32 focusPosition)
|
||||
u32 focusSaveDataEntry(const std::vector<SaveDataEntry>& saveEntries, u32 focusPosition)
|
||||
{
|
||||
// TODO: Get the correct index. Right now, this returns the first element of the list.
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setSaveDataEntries(std::vector<SaveDataListEntry>& saveEntries, mem_ptr_t<CellSaveDataDirList> fixedList, u32 fixedListNum)
|
||||
void setSaveDataList(std::vector<SaveDataEntry>& saveEntries, mem_ptr_t<CellSaveDataDirList> fixedList, u32 fixedListNum)
|
||||
{
|
||||
std::vector<SaveDataListEntry>::iterator entry = saveEntries.begin();
|
||||
std::vector<SaveDataEntry>::iterator entry = saveEntries.begin();
|
||||
while (entry != saveEntries.end())
|
||||
{
|
||||
bool found = false;
|
||||
|
@ -125,7 +123,35 @@ void setSaveDataEntries(std::vector<SaveDataListEntry>& saveEntries, mem_ptr_t<C
|
|||
}
|
||||
}
|
||||
|
||||
void getSaveDataStat(SaveDataListEntry entry, mem_ptr_t<CellSaveDataStatGet> statGet)
|
||||
void setSaveDataFixed(std::vector<SaveDataEntry>& saveEntries, mem_ptr_t<CellSaveDataFixedSet> fixedSet)
|
||||
{
|
||||
std::vector<SaveDataEntry>::iterator entry = saveEntries.begin();
|
||||
while (entry != saveEntries.end())
|
||||
{
|
||||
if (entry->dirName == (char*)Memory.VirtualToRealAddr(fixedSet->dirName_addr))
|
||||
entry = saveEntries.erase(entry);
|
||||
else
|
||||
entry++;
|
||||
}
|
||||
|
||||
if (saveEntries.size() == 0)
|
||||
{
|
||||
SaveDataEntry entry;
|
||||
entry.dirName = (char*)Memory.VirtualToRealAddr(fixedSet->dirName_addr);
|
||||
entry.isNew = true;
|
||||
saveEntries.push_back(entry);
|
||||
}
|
||||
|
||||
if (fixedSet->newIcon.IsGood())
|
||||
{
|
||||
saveEntries[0].iconBuf = Memory.VirtualToRealAddr(fixedSet->newIcon->iconBuf_addr);
|
||||
saveEntries[0].iconBufSize = fixedSet->newIcon->iconBufSize;
|
||||
saveEntries[0].title = (char*)Memory.VirtualToRealAddr(fixedSet->newIcon->title_addr);
|
||||
saveEntries[0].subtitle = (char*)Memory.VirtualToRealAddr(fixedSet->newIcon->title_addr);
|
||||
}
|
||||
}
|
||||
|
||||
void getSaveDataStat(SaveDataEntry entry, mem_ptr_t<CellSaveDataStatGet> statGet)
|
||||
{
|
||||
if (entry.isNew)
|
||||
statGet->isNewData = CELL_SAVEDATA_ISNEWDATA_YES;
|
||||
|
@ -188,24 +214,50 @@ void getSaveDataStat(SaveDataListEntry entry, mem_ptr_t<CellSaveDataStatGet> sta
|
|||
s32 readSaveDataFile(mem_ptr_t<CellSaveDataFileSet> fileSet, const std::string& saveDir)
|
||||
{
|
||||
void* dest = NULL;
|
||||
std::string filepath = saveDir + '/' + (char*)Memory.VirtualToRealAddr(fileSet->fileName_addr);
|
||||
vfsFile file(filepath);
|
||||
std::string filepath;
|
||||
|
||||
switch (fileSet->fileType)
|
||||
{
|
||||
case CELL_SAVEDATA_FILETYPE_SECUREFILE:
|
||||
case CELL_SAVEDATA_FILETYPE_NORMALFILE:
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON0:
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON1:
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_PIC1:
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_SND0:
|
||||
dest = Memory.VirtualToRealAddr(fileSet->fileBuf_addr);
|
||||
return file.Read(dest, min(fileSet->fileSize, fileSet->fileBufSize)); // TODO: This may fail for big files because of the dest pointer.
|
||||
|
||||
case CELL_SAVEDATA_FILETYPE_SECUREFILE: filepath = saveDir + "/" + (char*)Memory.VirtualToRealAddr(fileSet->fileName_addr); break;
|
||||
case CELL_SAVEDATA_FILETYPE_NORMALFILE: filepath = saveDir + "/" + (char*)Memory.VirtualToRealAddr(fileSet->fileName_addr); break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON0: filepath = saveDir + "/ICON0.PNG"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON1: filepath = saveDir + "/ICON1.PAM"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_PIC1: filepath = saveDir + "/PIC1.PNG"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_SND0: filepath = saveDir + "/SND0.AT3"; break;
|
||||
|
||||
default:
|
||||
ConLog.Error("readSaveDataFile: Unknown type! Aborting...");
|
||||
return -1;
|
||||
}
|
||||
|
||||
vfsFile file(filepath);
|
||||
dest = Memory.VirtualToRealAddr(fileSet->fileBuf_addr);
|
||||
return file.Read(dest, min(fileSet->fileSize, fileSet->fileBufSize)); // TODO: This may fail for big files because of the dest pointer.
|
||||
}
|
||||
|
||||
s32 writeSaveDataFile(mem_ptr_t<CellSaveDataFileSet> fileSet, const std::string& saveDir)
|
||||
{
|
||||
void* src = NULL;
|
||||
std::string filepath;
|
||||
|
||||
switch (fileSet->fileType)
|
||||
{
|
||||
case CELL_SAVEDATA_FILETYPE_SECUREFILE: filepath = saveDir + "/" + (char*)Memory.VirtualToRealAddr(fileSet->fileName_addr); break;
|
||||
case CELL_SAVEDATA_FILETYPE_NORMALFILE: filepath = saveDir + "/" + (char*)Memory.VirtualToRealAddr(fileSet->fileName_addr); break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON0: filepath = saveDir + "/ICON0.PNG"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_ICON1: filepath = saveDir + "/ICON1.PAM"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_PIC1: filepath = saveDir + "/PIC1.PNG"; break;
|
||||
case CELL_SAVEDATA_FILETYPE_CONTENT_SND0: filepath = saveDir + "/SND0.AT3"; break;
|
||||
|
||||
default:
|
||||
ConLog.Error("writeSaveDataFile: Unknown type! Aborting...");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Emu.GetVFS().CreateFile(filepath);
|
||||
vfsFile file(filepath, vfsWrite);
|
||||
src = Memory.VirtualToRealAddr(fileSet->fileBuf_addr);
|
||||
return file.Write(src, min(fileSet->fileSize, fileSet->fileBufSize)); // TODO: This may fail for big files because of the dest pointer.
|
||||
}
|
||||
|
||||
|
||||
|
@ -214,7 +266,7 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr)
|
||||
{
|
||||
cellSysutil.Warning("cellSaveDataListSave2(version=%d, setList_addr=0x%x, setBuf=0x%x, funcList=0x%x, funcStat=0x%x, funcFile=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
cellSysutil.Warning("cellSaveDataListSave2(version=%d, setList_addr=0x%x, setBuf_addr=0x%x, funcList_addr=0x%x, funcStat_addr=0x%x, funcFile_addr=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
version, setList.GetAddr(), setBuf.GetAddr(), funcList.GetAddr(), funcStat.GetAddr(), funcFile.GetAddr(), container, userdata_addr);
|
||||
|
||||
if (!setList.IsGood() || !setBuf.IsGood() || !funcList.IsGood() || !funcStat.IsGood() || !funcFile.IsGood())
|
||||
|
@ -223,6 +275,10 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
MemoryAllocator<CellSaveDataCBResult> result;
|
||||
MemoryAllocator<CellSaveDataListGet> listGet;
|
||||
MemoryAllocator<CellSaveDataListSet> listSet;
|
||||
MemoryAllocator<CellSaveDataStatGet> statGet;
|
||||
MemoryAllocator<CellSaveDataStatSet> statSet;
|
||||
MemoryAllocator<CellSaveDataFileGet> fileGet;
|
||||
MemoryAllocator<CellSaveDataFileSet> fileSet;
|
||||
|
||||
std::string saveBaseDir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current user
|
||||
vfsDir dir(saveBaseDir);
|
||||
|
@ -230,10 +286,10 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataListEntry> saveEntries;
|
||||
std::vector<SaveDataEntry> saveEntries;
|
||||
for(const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
if (entry->flags & DirEntry_TypeDir && entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
|
@ -263,7 +319,7 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
if (!listSet->fixedList.IsGood())
|
||||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
|
||||
setSaveDataEntries(saveEntries, (u32)listSet->fixedList.GetAddr(), listSet->fixedListNum);
|
||||
setSaveDataList(saveEntries, (u32)listSet->fixedList.GetAddr(), listSet->fixedListNum);
|
||||
if (listSet->newData.IsGood())
|
||||
addNewSaveDataEntry(saveEntries, (u32)listSet->newData.GetAddr());
|
||||
if (saveEntries.size() == 0) {
|
||||
|
@ -271,8 +327,6 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
return CELL_SAVEDATA_RET_OK;
|
||||
}
|
||||
|
||||
MemoryAllocator<CellSaveDataStatGet> statGet;
|
||||
MemoryAllocator<CellSaveDataStatSet> statSet;
|
||||
u32 focusIndex = focusSaveDataEntry(saveEntries, listSet->focusPosition);
|
||||
// TODO: Display the dialog here
|
||||
u32 selectedIndex = focusIndex; // TODO: Until the dialog is implemented, select always the focused entry
|
||||
|
@ -285,10 +339,37 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
ConLog.Error("cellSaveDataListLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
/*if (statSet->setParam.IsGood())
|
||||
addNewSaveDataEntry(saveEntries, (u32)listSet->newData.GetAddr()); // TODO: This *is* wrong
|
||||
*/
|
||||
|
||||
MemoryAllocator<CellSaveDataFileGet> fileGet;
|
||||
MemoryAllocator<CellSaveDataFileSet> fileSet;
|
||||
funcFile(result.GetAddr(), fileGet.GetAddr(), fileSet.GetAddr());
|
||||
if (!Emu.GetVFS().ExistsDir(saveBaseDir + (char*)statGet->dir.dirName))
|
||||
Emu.GetVFS().CreateDir(saveBaseDir + (char*)statGet->dir.dirName);
|
||||
|
||||
fileGet->excSize = 0;
|
||||
while (true)
|
||||
{
|
||||
funcFile(result.GetAddr(), fileGet.GetAddr(), fileSet.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataListLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
if (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST)
|
||||
break;
|
||||
switch (fileSet->fileOperation)
|
||||
{
|
||||
case CELL_SAVEDATA_FILEOP_READ:
|
||||
fileGet->excSize = readSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_WRITE:
|
||||
fileGet->excSize = writeSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_DELETE:
|
||||
case CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC:
|
||||
ConLog.Warning("cellSaveDataListLoad2: TODO: fileSet->fileOperation not yet implemented");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
|
||||
for (auto& entry : saveEntries) {
|
||||
|
@ -303,7 +384,7 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr)
|
||||
{
|
||||
cellSysutil.Warning("cellSaveDataListLoad2(version=%d, setList_addr=0x%x, setBuf=0x%x, funcList=0x%x, funcStat=0x%x, funcFile=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
cellSysutil.Warning("cellSaveDataListLoad2(version=%d, setList_addr=0x%x, setBuf_addr=0x%x, funcList_addr=0x%x, funcStat_addr=0x%x, funcFile_addr=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
version, setList.GetAddr(), setBuf.GetAddr(), funcList.GetAddr(), funcStat.GetAddr(), funcFile.GetAddr(), container, userdata_addr);
|
||||
|
||||
if (!setList.IsGood() || !setBuf.IsGood() || !funcList.IsGood() || !funcStat.IsGood() || !funcFile.IsGood())
|
||||
|
@ -323,10 +404,10 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataListEntry> saveEntries;
|
||||
std::vector<SaveDataEntry> saveEntries;
|
||||
for(const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir || entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
if (entry->flags & DirEntry_TypeDir && entry->name.substr(0,dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
|
@ -356,7 +437,7 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
if (!listSet->fixedList.IsGood())
|
||||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
|
||||
setSaveDataEntries(saveEntries, (u32)listSet->fixedList.GetAddr(), listSet->fixedListNum);
|
||||
setSaveDataList(saveEntries, (u32)listSet->fixedList.GetAddr(), listSet->fixedListNum);
|
||||
if (listSet->newData.IsGood())
|
||||
addNewSaveDataEntry(saveEntries, (u32)listSet->newData.GetAddr());
|
||||
if (saveEntries.size() == 0) {
|
||||
|
@ -376,8 +457,9 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
ConLog.Error("cellSaveDataListLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
if (statSet->setParam.IsGood())
|
||||
addNewSaveDataEntry(saveEntries, (u32)listSet->newData.GetAddr());
|
||||
/*if (statSet->setParam.IsGood())
|
||||
// TODO: Write PARAM.SFO file
|
||||
*/
|
||||
|
||||
fileGet->excSize = 0;
|
||||
while(true)
|
||||
|
@ -395,6 +477,8 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
|
|||
fileGet->excSize = readSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_WRITE:
|
||||
fileGet->excSize = writeSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_DELETE:
|
||||
case CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC:
|
||||
ConLog.Warning("cellSaveDataListLoad2: TODO: fileSet->fileOperation not yet implemented");
|
||||
|
@ -415,7 +499,101 @@ int cellSaveDataFixedSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList,
|
|||
mem_func_ptr_t<CellSaveDataFixedCallback> funcFixed, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSysutil);
|
||||
cellSysutil.Warning("cellSaveDataFixedSave2(version=%d, setList_addr=0x%x, setBuf_addr=0x%x, funcFixed_addr=0x%x, funcStat_addr=0x%x, funcFile_addr=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
version, setList.GetAddr(), setBuf.GetAddr(), funcFixed.GetAddr(), funcStat.GetAddr(), funcFile.GetAddr(), container, userdata_addr);
|
||||
|
||||
if (!setList.IsGood() || !setBuf.IsGood() || !funcFixed.IsGood() || !funcStat.IsGood() || !funcFile.IsGood())
|
||||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
|
||||
MemoryAllocator<CellSaveDataCBResult> result;
|
||||
MemoryAllocator<CellSaveDataListGet> listGet;
|
||||
MemoryAllocator<CellSaveDataFixedSet> fixedSet;
|
||||
MemoryAllocator<CellSaveDataStatGet> statGet;
|
||||
MemoryAllocator<CellSaveDataStatSet> statSet;
|
||||
MemoryAllocator<CellSaveDataFileGet> fileGet;
|
||||
MemoryAllocator<CellSaveDataFileSet> fileSet;
|
||||
|
||||
std::string saveBaseDir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current user
|
||||
vfsDir dir(saveBaseDir);
|
||||
if (!dir.IsOpened())
|
||||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataEntry> saveEntries;
|
||||
for (const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir && entry->name.substr(0, dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
if (listGet->dirListNum > setBuf->dirListMax)
|
||||
continue;
|
||||
listGet->dirNum++;
|
||||
|
||||
std::string saveDir = saveBaseDir + entry->name;
|
||||
addSaveDataEntry(saveEntries, saveDir);
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the entries and fill the listGet->dirList array
|
||||
std::sort(saveEntries.begin(), saveEntries.end(), sortSaveDataEntry(setList->sortType, setList->sortOrder));
|
||||
listGet->dirList.SetAddr(setBuf->buf_addr);
|
||||
CellSaveDataDirList* dirList = (CellSaveDataDirList*)Memory.VirtualToRealAddr(listGet->dirList.GetAddr());
|
||||
for (u32 i = 0; i<saveEntries.size(); i++) {
|
||||
memcpy(dirList[i].dirName, saveEntries[i].dirName.c_str(), CELL_SAVEDATA_DIRNAME_SIZE);
|
||||
memcpy(dirList[i].listParam, saveEntries[i].listParam.c_str(), CELL_SAVEDATA_SYSP_LPARAM_SIZE);
|
||||
}
|
||||
funcFixed(result.GetAddr(), listGet.GetAddr(), fixedSet.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedSave2: CellSaveDataFixedCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
setSaveDataFixed(saveEntries, fixedSet.GetAddr());
|
||||
getSaveDataStat(saveEntries[0], statGet.GetAddr()); // There should be only one element in this list
|
||||
// TODO: Display the Yes|No dialog here
|
||||
result->userdata_addr = userdata_addr;
|
||||
|
||||
funcStat(result.GetAddr(), statGet.GetAddr(), statSet.GetAddr());
|
||||
Memory.Free(statGet->fileList.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedSave2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
/*if (statSet->setParam.IsGood())
|
||||
// TODO: Write PARAM.SFO file
|
||||
*/
|
||||
|
||||
fileGet->excSize = 0;
|
||||
while (true)
|
||||
{
|
||||
funcFile(result.GetAddr(), fileGet.GetAddr(), fileSet.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedSave2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
if (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST)
|
||||
break;
|
||||
switch (fileSet->fileOperation)
|
||||
{
|
||||
case CELL_SAVEDATA_FILEOP_READ:
|
||||
fileGet->excSize = readSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_WRITE:
|
||||
fileGet->excSize = writeSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_DELETE:
|
||||
case CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC:
|
||||
ConLog.Warning("cellSaveDataFixedSave2: TODO: fileSet->fileOperation not yet implemented");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
|
||||
for (auto& entry : saveEntries) {
|
||||
delete[] entry.iconBuf;
|
||||
entry.iconBuf = nullptr;
|
||||
}
|
||||
|
||||
return CELL_SAVEDATA_RET_OK;
|
||||
}
|
||||
|
||||
|
@ -423,7 +601,101 @@ int cellSaveDataFixedLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList,
|
|||
mem_func_ptr_t<CellSaveDataFixedCallback> funcFixed, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSysutil);
|
||||
cellSysutil.Warning("cellSaveDataFixedLoad2(version=%d, setList_addr=0x%x, setBuf=0x%x, funcList=0x%x, funcStat=0x%x, funcFile=0x%x, container=%d, userdata_addr=0x%x)",
|
||||
version, setList.GetAddr(), setBuf.GetAddr(), funcFixed.GetAddr(), funcStat.GetAddr(), funcFile.GetAddr(), container, userdata_addr);
|
||||
|
||||
if (!setList.IsGood() || !setBuf.IsGood() || !funcFixed.IsGood() || !funcStat.IsGood() || !funcFile.IsGood())
|
||||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
|
||||
MemoryAllocator<CellSaveDataCBResult> result;
|
||||
MemoryAllocator<CellSaveDataListGet> listGet;
|
||||
MemoryAllocator<CellSaveDataFixedSet> fixedSet;
|
||||
MemoryAllocator<CellSaveDataStatGet> statGet;
|
||||
MemoryAllocator<CellSaveDataStatSet> statSet;
|
||||
MemoryAllocator<CellSaveDataFileGet> fileGet;
|
||||
MemoryAllocator<CellSaveDataFileSet> fileSet;
|
||||
|
||||
std::string saveBaseDir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current user
|
||||
vfsDir dir(saveBaseDir);
|
||||
if (!dir.IsOpened())
|
||||
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||
|
||||
std::string dirNamePrefix = Memory.ReadString(setList->dirNamePrefix_addr);
|
||||
std::vector<SaveDataEntry> saveEntries;
|
||||
for (const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||
{
|
||||
if (entry->flags & DirEntry_TypeDir && entry->name.substr(0, dirNamePrefix.size()) == dirNamePrefix)
|
||||
{
|
||||
// Count the amount of matches and the amount of listed directories
|
||||
listGet->dirListNum++;
|
||||
if (listGet->dirListNum > setBuf->dirListMax)
|
||||
continue;
|
||||
listGet->dirNum++;
|
||||
|
||||
std::string saveDir = saveBaseDir + entry->name;
|
||||
addSaveDataEntry(saveEntries, saveDir);
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the entries and fill the listGet->dirList array
|
||||
std::sort(saveEntries.begin(), saveEntries.end(), sortSaveDataEntry(setList->sortType, setList->sortOrder));
|
||||
listGet->dirList.SetAddr(setBuf->buf_addr);
|
||||
CellSaveDataDirList* dirList = (CellSaveDataDirList*)Memory.VirtualToRealAddr(listGet->dirList.GetAddr());
|
||||
for (u32 i = 0; i<saveEntries.size(); i++) {
|
||||
memcpy(dirList[i].dirName, saveEntries[i].dirName.c_str(), CELL_SAVEDATA_DIRNAME_SIZE);
|
||||
memcpy(dirList[i].listParam, saveEntries[i].listParam.c_str(), CELL_SAVEDATA_SYSP_LPARAM_SIZE);
|
||||
}
|
||||
funcFixed(result.GetAddr(), listGet.GetAddr(), fixedSet.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedLoad2: CellSaveDataFixedCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
setSaveDataFixed(saveEntries, fixedSet.GetAddr());
|
||||
getSaveDataStat(saveEntries[0], statGet.GetAddr()); // There should be only one element in this list
|
||||
// TODO: Display the Yes|No dialog here
|
||||
result->userdata_addr = userdata_addr;
|
||||
|
||||
funcStat(result.GetAddr(), statGet.GetAddr(), statSet.GetAddr());
|
||||
Memory.Free(statGet->fileList.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
/*if (statSet->setParam.IsGood())
|
||||
// TODO: Write PARAM.SFO file
|
||||
*/
|
||||
|
||||
fileGet->excSize = 0;
|
||||
while (true)
|
||||
{
|
||||
funcFile(result.GetAddr(), fileGet.GetAddr(), fileSet.GetAddr());
|
||||
if (result->result < 0) {
|
||||
ConLog.Error("cellSaveDataFixedLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
if (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST)
|
||||
break;
|
||||
switch (fileSet->fileOperation)
|
||||
{
|
||||
case CELL_SAVEDATA_FILEOP_READ:
|
||||
fileGet->excSize = readSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_WRITE:
|
||||
fileGet->excSize = writeSaveDataFile(fileSet.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
|
||||
break;
|
||||
case CELL_SAVEDATA_FILEOP_DELETE:
|
||||
case CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC:
|
||||
ConLog.Warning("cellSaveDataFixedLoad2: TODO: fileSet->fileOperation not yet implemented");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
|
||||
for (auto& entry : saveEntries) {
|
||||
delete[] entry.iconBuf;
|
||||
entry.iconBuf = nullptr;
|
||||
}
|
||||
|
||||
return CELL_SAVEDATA_RET_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ typedef void (*CellSaveDataDoneCallback) (mem_ptr_t<CellSaveDataCBResult> cbResu
|
|||
|
||||
|
||||
// Auxiliary Structs
|
||||
struct SaveDataListEntry
|
||||
struct SaveDataEntry
|
||||
{
|
||||
std::string dirName;
|
||||
std::string listParam;
|
||||
|
@ -274,9 +274,17 @@ struct SaveDataListEntry
|
|||
|
||||
// Function declarations
|
||||
int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, mem_ptr_t<CellSaveDataSetBuf> setBuf,
|
||||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
|
||||
int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, mem_ptr_t<CellSaveDataSetBuf> setBuf,
|
||||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
mem_func_ptr_t<CellSaveDataListCallback> funcList, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
|
||||
int cellSaveDataFixedSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, mem_ptr_t<CellSaveDataSetBuf> setBuf,
|
||||
mem_func_ptr_t<CellSaveDataFixedCallback> funcFixed, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
|
||||
int cellSaveDataFixedLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, mem_ptr_t<CellSaveDataSetBuf> setBuf,
|
||||
mem_func_ptr_t<CellSaveDataFixedCallback> funcFixed, mem_func_ptr_t<CellSaveDataStatCallback> funcStat, mem_func_ptr_t<CellSaveDataFileCallback> funcFile,
|
||||
u32 container, u32 userdata_addr);
|
||||
|
|
|
@ -402,7 +402,7 @@ void libmixer_init()
|
|||
0xffffffff7c6307b4,
|
||||
0xffffffff7c0803a6,
|
||||
0xffffffff38210070,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxAAN", cellAANConnect,
|
||||
|
@ -443,7 +443,7 @@ void libmixer_init()
|
|||
0xffffffffe80100a0,
|
||||
0xffffffff38210090,
|
||||
0xffffffff7c0803a6,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxAAN", cellAANDisconnect,
|
||||
|
@ -484,7 +484,7 @@ void libmixer_init()
|
|||
0xffffffffe80100a0,
|
||||
0xffffffff38210090,
|
||||
0xffffffff7c0803a6,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerCreate,
|
||||
|
@ -513,7 +513,7 @@ void libmixer_init()
|
|||
0xffffffffeba10098,
|
||||
0xffffffffebc100a0,
|
||||
0xffffffffebe100a8,
|
||||
0xffffffff382100b0,
|
||||
0xffffffff382100b0
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetAANHandle,
|
||||
|
@ -530,7 +530,7 @@ void libmixer_init()
|
|||
0xffffffff3c638031,
|
||||
0xffffffff38630002,
|
||||
0xffffffff7c6307b4,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerChStripGetAANPortNo,
|
||||
|
@ -545,7 +545,7 @@ void libmixer_init()
|
|||
0xffffffff2f800000,
|
||||
0xffffffff4d9e0020,
|
||||
0xffffffff78030020,
|
||||
0xf000000040000000, // b
|
||||
0xf000000040000000 // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSetNotifyCallback,
|
||||
|
@ -573,7 +573,7 @@ void libmixer_init()
|
|||
0xffffffff79290020,
|
||||
0xffffffff38810070,
|
||||
0xffffffff2f800000,
|
||||
0xffffffff7d234b78,
|
||||
0xffffffff7d234b78
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerRemoveNotifyCallback,
|
||||
|
@ -591,7 +591,7 @@ void libmixer_init()
|
|||
0xffffffff7d2307b4,
|
||||
0xffffffff38210080,
|
||||
0xffffffff7c0803a6,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerStart,
|
||||
|
@ -614,7 +614,7 @@ void libmixer_init()
|
|||
0xffffffff7c0803a6,
|
||||
0xffffffffebe10088,
|
||||
0xffffffff38210090,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSetParameter,
|
||||
|
@ -644,7 +644,7 @@ void libmixer_init()
|
|||
0xffff0000419cffd8, // blt
|
||||
0xffffffff2b83002b,
|
||||
0xffff000040990008, // ble
|
||||
0xffff0000409d0054, // ble
|
||||
0xffff0000409d0054 // ble
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerFinalize,
|
||||
|
@ -670,7 +670,7 @@ void libmixer_init()
|
|||
0xfffffffff8410028,
|
||||
0xffffffff7c0903a6,
|
||||
0xffffffff804a0004,
|
||||
0xffffffff4e800421,
|
||||
0xffffffff4e800421
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerSurBusAddData,
|
||||
|
@ -699,7 +699,7 @@ void libmixer_init()
|
|||
0xffffffff7d034378,
|
||||
0xffffffff79660020,
|
||||
0xffffffff78e70020,
|
||||
0xffff0000419cffcc, // blt
|
||||
0xffff0000419cffcc // blt
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerChStripSetParameter,
|
||||
|
@ -719,7 +719,7 @@ void libmixer_init()
|
|||
0xffffffff78c60020,
|
||||
0xffffffff4d9c0020,
|
||||
0xffffffff79230020,
|
||||
0xf000000048000000, // b
|
||||
0xf000000048000000 // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerPause,
|
||||
|
@ -744,7 +744,7 @@ void libmixer_init()
|
|||
0xffffffff4e800020,
|
||||
0xffffffff800a001c,
|
||||
0xffffffff2b030002,
|
||||
0xffffffff2f800000,
|
||||
0xffffffff2f800000
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetCurrentBlockTag,
|
||||
|
@ -758,7 +758,7 @@ void libmixer_init()
|
|||
0xffffffff39200000,
|
||||
0xfffffffff8030000,
|
||||
0xffffffff7d2307b4,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerGetTimestamp,
|
||||
|
@ -780,7 +780,7 @@ void libmixer_init()
|
|||
0xffffffff7c0803a6,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff806b04d8,
|
||||
0xf000000048000001, // bl
|
||||
0xf000000048000001 // bl
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmixer", cellSurMixerBeep,
|
||||
|
@ -794,7 +794,7 @@ void libmixer_init()
|
|||
0xffffffff78840020,
|
||||
0xffffffff2f800000,
|
||||
0xffffffff4d9c0020,
|
||||
0xf000000048000000, // b
|
||||
0xf000000048000000 // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerCreate,
|
||||
|
@ -828,7 +828,7 @@ void libmixer_init()
|
|||
0xffffffff2f9d0000,
|
||||
0xffffffff7ba30020,
|
||||
0xffff000041de00c0, // beq-
|
||||
0xf000000048000001, // bl
|
||||
0xf000000048000001 // bl
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerRemove,
|
||||
|
@ -858,7 +858,7 @@ void libmixer_init()
|
|||
0xfffffffff8410028,
|
||||
0xffffffff7c0903a6,
|
||||
0xffffffff804b0004,
|
||||
0xffffffff4e800421,
|
||||
0xffffffff4e800421
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerSetWave,
|
||||
|
@ -871,7 +871,7 @@ void libmixer_init()
|
|||
0xffffffff78030020,
|
||||
0xf000000048000000, // b
|
||||
0xffffffff60630003,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerPlay,
|
||||
|
@ -890,7 +890,7 @@ void libmixer_init()
|
|||
0xff00000081620028, // lwz
|
||||
0xfffffffff8010090,
|
||||
0xffffffff39400000,
|
||||
0xffffffff38630010,
|
||||
0xffffffff38630010
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerStop,
|
||||
|
@ -909,7 +909,7 @@ void libmixer_init()
|
|||
0xffffffffe8010080,
|
||||
0xffffffff38210070,
|
||||
0xffffffff7c0803a6,
|
||||
0xffffffff4e800020,
|
||||
0xffffffff4e800020
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerSetParam,
|
||||
|
@ -928,7 +928,7 @@ void libmixer_init()
|
|||
0xffffffff80030068,
|
||||
0xffffffff616b0002,
|
||||
0xfffffffffbc10080,
|
||||
0xffffffff2f800000,
|
||||
0xffffffff2f800000
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxSSP", cellSSPlayerGetState,
|
||||
|
@ -938,10 +938,10 @@ void libmixer_init()
|
|||
0xffffffff60630003,
|
||||
0xffffffff4d9e0020,
|
||||
0xffffffff78030020,
|
||||
0xf000000048000000, // b
|
||||
0xf000000048000000 // b
|
||||
);
|
||||
|
||||
REG_SUB(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDB);
|
||||
REG_SUB(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDBIndex);
|
||||
REG_SUB(libmixer, "surmxUti", cellSurMixerUtilNoteToRatio);
|
||||
REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDB);
|
||||
REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilGetLevelFromDBIndex);
|
||||
REG_SUB_EMPTY(libmixer, "surmxUti", cellSurMixerUtilNoteToRatio);
|
||||
}
|
|
@ -112,7 +112,7 @@ u16 cellSoundSynth2Pitch2Note(u16 center_note, u16 center_fine, u16 pitch)
|
|||
|
||||
void libsynth2_init()
|
||||
{
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Init,
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Init,
|
||||
/*
|
||||
0xffffffff7d800026,
|
||||
0xfffffffff821ff41,
|
||||
|
@ -140,20 +140,20 @@ void libsynth2_init()
|
|||
0xffffffff3ba00000,
|
||||
*/
|
||||
);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Exit);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Config);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2GetAddr);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2GetParam);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2GetSwitch);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetAddr);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetParam);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetSwitch);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetEffectMode);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetEffectAttr);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Note2Pitch);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Pitch2Note);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2VoiceTrans);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2VoiceTransStatus);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2SetCoreAttr);
|
||||
REG_SUB(libsynth2, "synth2", cellSoundSynth2Generate);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Exit);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Config);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetAddr);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetParam);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2GetSwitch);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetAddr);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetParam);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetSwitch);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetEffectMode);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetEffectAttr);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Note2Pitch);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Pitch2Note);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2VoiceTrans);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2VoiceTransStatus);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2SetCoreAttr);
|
||||
REG_SUB_EMPTY(libsynth2, "synth2", cellSoundSynth2Generate);
|
||||
}
|
|
@ -18,6 +18,8 @@ void sys_io_init()
|
|||
sys_io.AddFunc(0x578e3c98, cellPadSetPortSetting);
|
||||
sys_io.AddFunc(0x0e2dfaad, cellPadInfoPressMode);
|
||||
sys_io.AddFunc(0x78200559, cellPadInfoSensorMode);
|
||||
sys_io.AddFunc(0xf83f8182, cellPadSetPressMode);
|
||||
sys_io.AddFunc(0xbe5be3ba, cellPadSetSensorMode);
|
||||
|
||||
sys_io.AddFunc(0x433f6ec0, cellKbInit);
|
||||
sys_io.AddFunc(0xbfce3285, cellKbEnd);
|
||||
|
|
|
@ -312,6 +312,8 @@ extern int cellPadGetInfo2(u32 info_addr);
|
|||
extern int cellPadSetPortSetting(u32 port_no, u32 port_setting);
|
||||
extern int cellPadInfoPressMode(u32 port_no);
|
||||
extern int cellPadInfoSensorMode(u32 port_no);
|
||||
extern int cellPadSetPressMode(u32 port_no, u32 mode);
|
||||
extern int cellPadSetSensorMode(u32 port_no, u32 mode);
|
||||
|
||||
//cellKb
|
||||
extern int cellKbInit(u32 max_connect);
|
||||
|
@ -468,8 +470,12 @@ void StaticAnalyse(void* ptr, u32 size, u32 base);
|
|||
void StaticExecute(u32 code);
|
||||
void StaticFinalize();
|
||||
|
||||
#define REG_SUB(module, group, name,...) \
|
||||
static const u64 name ## _table[] = {__VA_ARGS__ ## 0}; \
|
||||
#define REG_SUB(module, group, name, ...) \
|
||||
static const u64 name ## _table[] = {__VA_ARGS__ , 0}; \
|
||||
module.AddFuncSub(group, name ## _table, #name, name)
|
||||
|
||||
#define REG_SUB_EMPTY(module, group, name,...) \
|
||||
static const u64 name ## _table[] = {0}; \
|
||||
module.AddFuncSub(group, name ## _table, #name, name)
|
||||
|
||||
extern u64 get_system_time();
|
|
@ -38,7 +38,7 @@ int cellKbClearBuf(u32 port_no)
|
|||
{
|
||||
sys_io.Log("cellKbClearBuf(port_no=%d)", port_no);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetKeyboardManager().GetKeyboards().GetCount()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetKeyboardManager().GetKeyboards().size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
//?
|
||||
|
||||
|
@ -114,9 +114,9 @@ int cellKbRead(u32 port_no, mem_class_t data)
|
|||
{
|
||||
sys_io.Log("cellKbRead(port_no=%d,info_addr=0x%x)", port_no, data.GetAddr());
|
||||
|
||||
const Array<Keyboard>& keyboards = Emu.GetKeyboardManager().GetKeyboards();
|
||||
const std::vector<Keyboard>& keyboards = Emu.GetKeyboardManager().GetKeyboards();
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= keyboards.GetCount()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= keyboards.size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
CellKbData& current_data = Emu.GetKeyboardManager().GetData(port_no);
|
||||
data += current_data.led;
|
||||
|
|
|
@ -31,7 +31,7 @@ int cellMouseClearBuf(u32 port_no)
|
|||
{
|
||||
sys_io.Log("cellMouseClearBuf(port_no=%d)", port_no);
|
||||
if(!Emu.GetMouseManager().IsInited()) return CELL_MOUSE_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().GetCount()) return CELL_MOUSE_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().size()) return CELL_MOUSE_ERROR_INVALID_PARAMETER;
|
||||
|
||||
//?
|
||||
|
||||
|
@ -66,7 +66,7 @@ int cellMouseInfoTabletMode(u32 port_no, mem_class_t info)
|
|||
{
|
||||
sys_io.Log("cellMouseInfoTabletMode(port_no=%d,info_addr=0x%x)", port_no, info.GetAddr());
|
||||
if(!Emu.GetMouseManager().IsInited()) return CELL_MOUSE_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().GetCount()) return CELL_MOUSE_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().size()) return CELL_MOUSE_ERROR_INVALID_PARAMETER;
|
||||
|
||||
info += 0; // Unimplemented: (0=Tablet mode is not supported)
|
||||
info += 1; // Unimplemented: (1=Mouse mode)
|
||||
|
@ -78,7 +78,7 @@ int cellMouseGetData(u32 port_no, mem_class_t data)
|
|||
{
|
||||
sys_io.Log("cellMouseGetData(port_no=%d,data_addr=0x%x)", port_no, data.GetAddr());
|
||||
if(!Emu.GetMouseManager().IsInited()) return CELL_MOUSE_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().GetCount()) return CELL_MOUSE_ERROR_NO_DEVICE;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().size()) return CELL_MOUSE_ERROR_NO_DEVICE;
|
||||
|
||||
CellMouseData& current_data = Emu.GetMouseManager().GetData(port_no);
|
||||
data += current_data.update;
|
||||
|
@ -123,7 +123,7 @@ int cellMouseGetRawData(u32 port_no, mem_class_t data)
|
|||
|
||||
/*sys_io.Log("cellMouseGetRawData(port_no=%d,data_addr=0x%x)", port_no, data.GetAddr());
|
||||
if(!Emu.GetMouseManager().IsInited()) return CELL_MOUSE_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().GetCount()) return CELL_MOUSE_ERROR_NO_DEVICE;
|
||||
if(port_no >= Emu.GetMouseManager().GetMice().size()) return CELL_MOUSE_ERROR_NO_DEVICE;
|
||||
|
||||
CellMouseRawData& current_rawdata = Emu.GetMouseManager().GetRawData(port_no);
|
||||
data += current_rawdata.len;
|
||||
|
|
|
@ -65,7 +65,7 @@ int cellPadClearBuf(u32 port_no)
|
|||
{
|
||||
sys_io.Log("cellPadClearBuf(port_no=%d)", port_no);
|
||||
if(!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().GetCount()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().size()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
|
||||
//?
|
||||
|
||||
|
@ -75,9 +75,9 @@ int cellPadClearBuf(u32 port_no)
|
|||
int cellPadGetData(u32 port_no, u32 data_addr)
|
||||
{
|
||||
sys_io.Log("cellPadGetData[port_no: %d, data_addr: 0x%x]", port_no, data_addr);
|
||||
const Array<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
std::vector<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
if(!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
if(port_no >= pads.GetCount()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= pads.size()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
|
||||
const Pad& pad = pads[port_no];
|
||||
CellPadData data;
|
||||
|
@ -86,24 +86,24 @@ int cellPadGetData(u32 port_no, u32 data_addr)
|
|||
u16 d1 = 0;
|
||||
u16 d2 = 0;
|
||||
|
||||
const Array<Button>& buttons = pads[port_no].m_buttons;
|
||||
pads[port_no].m_port_status &= ~CELL_PAD_STATUS_ASSIGN_CHANGES;
|
||||
|
||||
s32 len = 0;
|
||||
for(uint i=0; i<buttons.GetCount(); ++i)
|
||||
for(Button& button : pads[port_no].m_buttons)
|
||||
{
|
||||
if(!buttons[i].m_pressed) continue;
|
||||
if(!button.m_pressed)
|
||||
continue;
|
||||
|
||||
switch(buttons[i].m_offset)
|
||||
switch(button.m_offset)
|
||||
{
|
||||
case CELL_PAD_BTN_OFFSET_DIGITAL1: if(!(d1 & buttons[i].m_outKeyCode)){d1 |= buttons[i].m_outKeyCode; len++;} break;
|
||||
case CELL_PAD_BTN_OFFSET_DIGITAL2: if(!(d2 & buttons[i].m_outKeyCode)){d2 |= buttons[i].m_outKeyCode; len++;} break;
|
||||
case CELL_PAD_BTN_OFFSET_DIGITAL1: if(!(d1 & button.m_outKeyCode)){d1 |= button.m_outKeyCode; len++;} break;
|
||||
case CELL_PAD_BTN_OFFSET_DIGITAL2: if(!(d2 & button.m_outKeyCode)){d2 |= button.m_outKeyCode; len++;} break;
|
||||
}
|
||||
|
||||
if(buttons[i].m_flush)
|
||||
if(button.m_flush)
|
||||
{
|
||||
buttons[i].m_pressed = false;
|
||||
buttons[i].m_flush = false;
|
||||
button.m_pressed = false;
|
||||
button.m_flush = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,11 +111,10 @@ int cellPadGetData(u32 port_no, u32 data_addr)
|
|||
u16 ly = 128;
|
||||
u16 rx = 128;
|
||||
u16 ry = 128;
|
||||
const Array<AnalogStick>& sticks = pads[port_no].m_sticks;
|
||||
for (u32 s = 0; s < sticks.GetCount(); s++)
|
||||
for (const AnalogStick& stick : pads[port_no].m_sticks)
|
||||
{
|
||||
u16* res;
|
||||
switch (sticks[s].m_offset)
|
||||
switch (stick.m_offset)
|
||||
{
|
||||
case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X: res = &lx; break;
|
||||
case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y: res = &ly; break;
|
||||
|
@ -124,9 +123,9 @@ int cellPadGetData(u32 port_no, u32 data_addr)
|
|||
default: continue;
|
||||
}
|
||||
|
||||
if (sticks[s].m_max_pressed && !sticks[s].m_min_pressed)
|
||||
if (stick.m_max_pressed && !stick.m_min_pressed)
|
||||
*res = 255;
|
||||
if (sticks[s].m_min_pressed && !sticks[s].m_max_pressed)
|
||||
if (stick.m_min_pressed && !stick.m_max_pressed)
|
||||
*res = 0;
|
||||
}
|
||||
|
||||
|
@ -163,7 +162,7 @@ int cellPadGetDataExtra(u32 port_no, u32 device_type_addr, u32 data_addr)
|
|||
{
|
||||
sys_io.Log("cellPadGetDataExtra(port_no=%d, device_type_addr=0x%x, device_type_addr=0x%x)", port_no, device_type_addr, data_addr);
|
||||
if(!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().GetCount()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().size()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -171,7 +170,7 @@ int cellPadSetActDirect(u32 port_no, u32 param_addr)
|
|||
{
|
||||
sys_io.Log("cellPadSetActDirect(port_no=%d, param_addr=0x%x)", port_no, param_addr);
|
||||
if(!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().GetCount()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
if(port_no >= Emu.GetPadManager().GetPads().size()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -188,11 +187,12 @@ int cellPadGetInfo(u32 info_addr)
|
|||
info.now_connect = rinfo.now_connect;
|
||||
info.system_info = rinfo.system_info;
|
||||
|
||||
const Array<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
const std::vector<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
|
||||
for(u32 i=0; i<CELL_MAX_PADS; ++i)
|
||||
{
|
||||
if(i >= pads.GetCount()) break;
|
||||
if(i >= pads.size())
|
||||
break;
|
||||
|
||||
info.status[i] = pads[i].m_port_status;
|
||||
info.product_id[i] = 0x0268;
|
||||
|
@ -217,11 +217,13 @@ int cellPadGetInfo2(u32 info_addr)
|
|||
info.now_connect = rinfo.now_connect;
|
||||
info.system_info = rinfo.system_info;
|
||||
|
||||
const Array<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
const std::vector<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
|
||||
for(u32 i=0; i<CELL_PAD_MAX_PORT_NUM; ++i)
|
||||
{
|
||||
if(i >= pads.GetCount()) break;
|
||||
if(i >= pads.size())
|
||||
break;
|
||||
|
||||
info.port_status[i] = pads[i].m_port_status;
|
||||
info.port_setting[i] = pads[i].m_port_setting;
|
||||
info.device_capability[i] = pads[i].m_device_capability;
|
||||
|
@ -237,8 +239,8 @@ int cellPadSetPortSetting(u32 port_no, u32 port_setting)
|
|||
{
|
||||
sys_io.Log("cellPadSetPortSetting(port_no=%d, port_setting=0x%x)", port_no, port_setting);
|
||||
if(!Emu.GetPadManager().IsInited()) return CELL_PAD_ERROR_UNINITIALIZED;
|
||||
Array<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
if(port_no >= pads.GetCount()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
std::vector<Pad>& pads = Emu.GetPadManager().GetPads();
|
||||
if(port_no >= pads.size()) return CELL_PAD_ERROR_INVALID_PARAMETER;
|
||||
|
||||
pads[port_no].m_port_setting = port_setting;
|
||||
|
||||
|
@ -255,4 +257,16 @@ int cellPadInfoSensorMode(u32 port_no)
|
|||
{
|
||||
sys_io.Error("cellPadInfoSensorMode(port_no=%d)", port_no);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellPadSetPressMode(u32 port_no, u32 mode)
|
||||
{
|
||||
sys_io.Error("cellPadSetPressMode(port_no=%d)", port_no);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellPadSetSensorMode(u32 port_no, u32 mode)
|
||||
{
|
||||
sys_io.Error("cellPadSetPressMode(port_no=%d)", port_no);
|
||||
return CELL_OK;
|
||||
}
|
|
@ -11,7 +11,7 @@ class LogWriter
|
|||
//wxString m_prefix;
|
||||
//wxString m_value;
|
||||
|
||||
virtual void WriteToLog(const std::string& prefix, const std::string& value, u8 lvl);
|
||||
void WriteToLog(const std::string& prefix, const std::string& value, u8 lvl);
|
||||
|
||||
public:
|
||||
LogWriter();
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "CompilerELF.h"
|
||||
#include "MemoryViewer.h"
|
||||
#include "RSXDebugger.h"
|
||||
#include "PADManager.h"
|
||||
|
||||
#include "git-version.h"
|
||||
#include "Ini.h"
|
||||
|
@ -38,26 +39,6 @@ enum IDs
|
|||
id_update_dbg,
|
||||
};
|
||||
|
||||
enum PadIDs
|
||||
{
|
||||
id_pad_left,
|
||||
id_pad_down,
|
||||
id_pad_right,
|
||||
id_pad_up,
|
||||
id_pad_start,
|
||||
id_pad_r3,
|
||||
id_pad_l3,
|
||||
id_pad_select,
|
||||
id_pad_square,
|
||||
id_pad_cross,
|
||||
id_pad_circle,
|
||||
id_pad_triangle,
|
||||
id_pad_r1,
|
||||
id_pad_l1,
|
||||
id_pad_r2,
|
||||
id_pad_l2,
|
||||
};
|
||||
|
||||
wxString GetPaneName()
|
||||
{
|
||||
static int pane_num = 0;
|
||||
|
@ -574,189 +555,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
void MainFrame::ConfigPad(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
bool paused = false;
|
||||
|
||||
if(Emu.IsRunning())
|
||||
{
|
||||
Emu.Pause();
|
||||
paused = true;
|
||||
}
|
||||
|
||||
wxDialog diag(this, wxID_ANY, "PAD Settings", wxDefaultPosition);
|
||||
|
||||
wxBoxSizer* s_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
wxBoxSizer* s_subpanel1(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel2(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel3(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel4(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel5(new wxBoxSizer(wxVERTICAL));
|
||||
|
||||
wxStaticBoxSizer* s_round_pad_controls( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Controls") ) );
|
||||
wxStaticBoxSizer* s_round_pad_left( new wxStaticBoxSizer( wxVERTICAL, &diag, _("LEFT") ) );
|
||||
wxStaticBoxSizer* s_round_pad_down( new wxStaticBoxSizer( wxVERTICAL, &diag, _("DOWN") ) );
|
||||
wxStaticBoxSizer* s_round_pad_right( new wxStaticBoxSizer( wxVERTICAL, &diag, _("RIGHT") ) );
|
||||
wxStaticBoxSizer* s_round_pad_up( new wxStaticBoxSizer( wxVERTICAL, &diag, _("UP") ) );
|
||||
|
||||
wxStaticBoxSizer* s_round_pad_shifts_l( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Shifts") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l1( new wxStaticBoxSizer( wxVERTICAL, &diag, _("L1") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l2( new wxStaticBoxSizer( wxVERTICAL, &diag, _("L2") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l3( new wxStaticBoxSizer( wxVERTICAL, &diag, _("L3") ) );
|
||||
|
||||
wxStaticBoxSizer* s_round_pad_system( new wxStaticBoxSizer( wxVERTICAL, &diag, _("System") ) );
|
||||
wxStaticBoxSizer* s_round_pad_select( new wxStaticBoxSizer( wxVERTICAL, &diag, _("SELECT") ) );
|
||||
wxStaticBoxSizer* s_round_pad_start( new wxStaticBoxSizer( wxVERTICAL, &diag, _("START") ) );
|
||||
|
||||
wxStaticBoxSizer* s_round_pad_shifts_r( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Shifts") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r1( new wxStaticBoxSizer( wxVERTICAL, &diag, _("R1") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r2( new wxStaticBoxSizer( wxVERTICAL, &diag, _("R2") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r3( new wxStaticBoxSizer( wxVERTICAL, &diag, _("R3") ) );
|
||||
|
||||
wxStaticBoxSizer* s_round_pad_buttons( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Buttons") ) );
|
||||
wxStaticBoxSizer* s_round_pad_square( new wxStaticBoxSizer( wxVERTICAL, &diag, _("SQUARE") ) );
|
||||
wxStaticBoxSizer* s_round_pad_cross( new wxStaticBoxSizer( wxVERTICAL, &diag, _("CROSS") ) );
|
||||
wxStaticBoxSizer* s_round_pad_circle( new wxStaticBoxSizer( wxVERTICAL, &diag, _("CIRCLE") ) );
|
||||
wxStaticBoxSizer* s_round_pad_triangle( new wxStaticBoxSizer( wxVERTICAL, &diag, _("TRIANGLE") ) );
|
||||
|
||||
|
||||
wxComboBox* cbox_pad_left = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_down = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_right = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_up = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_start = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_r3 = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_l3 = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_select = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_square = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_cross = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_circle = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_triangle = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_r1 = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_l1 = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_r2 = new wxComboBox(&diag, wxID_ANY);
|
||||
wxComboBox* cbox_pad_l2 = new wxComboBox(&diag, wxID_ANY);
|
||||
|
||||
for(int i=0; i<128; i++)
|
||||
{
|
||||
cbox_pad_left->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_down->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_right->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_up->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_r3->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_l3->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_square->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_cross->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_circle->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_triangle->Append(wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_r1->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_l1->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_r2->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
cbox_pad_l2->Append (wxString::Format("%c", static_cast<char>(i) ) );
|
||||
}
|
||||
|
||||
cbox_pad_start->Append("Enter");
|
||||
cbox_pad_select->Append("Space");
|
||||
|
||||
cbox_pad_left->SetSelection (Ini.PadHandlerLeft.GetValue());
|
||||
cbox_pad_down->SetSelection (Ini.PadHandlerDown.GetValue());
|
||||
cbox_pad_right->SetSelection (Ini.PadHandlerRight.GetValue());
|
||||
cbox_pad_up->SetSelection (Ini.PadHandlerUp.GetValue());
|
||||
cbox_pad_start->SetSelection (Ini.PadHandlerStart.GetValue());
|
||||
cbox_pad_r3->SetSelection (Ini.PadHandlerR3.GetValue());
|
||||
cbox_pad_l3->SetSelection (Ini.PadHandlerL3.GetValue());
|
||||
cbox_pad_select->SetSelection (Ini.PadHandlerSelect.GetValue());
|
||||
cbox_pad_square->SetSelection (Ini.PadHandlerSquare.GetValue());
|
||||
cbox_pad_cross->SetSelection (Ini.PadHandlerCross.GetValue());
|
||||
cbox_pad_circle->SetSelection (Ini.PadHandlerCircle.GetValue());
|
||||
cbox_pad_triangle->SetSelection (Ini.PadHandlerTriangle.GetValue());
|
||||
cbox_pad_r1->SetSelection (Ini.PadHandlerR1.GetValue());
|
||||
cbox_pad_l1->SetSelection (Ini.PadHandlerL1.GetValue());
|
||||
cbox_pad_r2->SetSelection (Ini.PadHandlerR2.GetValue());
|
||||
cbox_pad_l2->SetSelection (Ini.PadHandlerL2.GetValue());
|
||||
|
||||
s_round_pad_left->Add(cbox_pad_left, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_down->Add(cbox_pad_down, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_right->Add(cbox_pad_right, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_up->Add(cbox_pad_up, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_start->Add(cbox_pad_start, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_r3->Add(cbox_pad_r3, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_l3->Add(cbox_pad_l3, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_select->Add(cbox_pad_select, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_square->Add(cbox_pad_square, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_cross->Add(cbox_pad_cross, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_circle->Add(cbox_pad_circle, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_triangle->Add(cbox_pad_triangle, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_r1->Add(cbox_pad_r1, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_l1->Add(cbox_pad_l1, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_r2->Add(cbox_pad_r2, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_l2->Add(cbox_pad_l2, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
|
||||
s_round_pad_controls->Add(s_round_pad_left, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_controls->Add(s_round_pad_down, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_controls->Add(s_round_pad_right, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_controls->Add(s_round_pad_up, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l1, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l2, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l3, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_pad_system->Add(s_round_pad_start, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_system->Add(s_round_pad_select, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r1, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r2, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r3, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
|
||||
s_round_pad_buttons->Add(s_round_pad_square, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_buttons->Add(s_round_pad_cross, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_buttons->Add(s_round_pad_circle, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_pad_buttons->Add(s_round_pad_triangle, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
|
||||
s_b_panel->Add(new wxButton(&diag, wxID_OK), wxSizerFlags().Border(wxALL, 5).Center());
|
||||
s_b_panel->Add(new wxButton(&diag, wxID_CANCEL), wxSizerFlags().Border(wxALL, 5).Center());
|
||||
|
||||
s_subpanel1->Add(s_round_pad_controls, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel2->Add(s_round_pad_shifts_l, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel3->Add(s_round_pad_system, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel3->Add(s_b_panel, wxSizerFlags().Border(wxALL, 8).Expand());
|
||||
s_subpanel4->Add(s_round_pad_shifts_r, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel5->Add(s_round_pad_buttons, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_panel->Add(s_subpanel1, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_panel->Add(s_subpanel2, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_panel->Add(s_subpanel3, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_panel->Add(s_subpanel4, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_panel->Add(s_subpanel5, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
diag.SetSizerAndFit( s_panel );
|
||||
|
||||
if(diag.ShowModal() == wxID_OK)
|
||||
{
|
||||
Ini.PadHandlerLeft.SetValue(cbox_pad_left->GetSelection());
|
||||
Ini.PadHandlerDown.SetValue(cbox_pad_down->GetSelection());
|
||||
Ini.PadHandlerRight.SetValue(cbox_pad_right->GetSelection());
|
||||
Ini.PadHandlerUp.SetValue(cbox_pad_up->GetSelection());
|
||||
Ini.PadHandlerStart.SetValue(cbox_pad_start->GetSelection());
|
||||
Ini.PadHandlerR3.SetValue(cbox_pad_r3->GetSelection());
|
||||
Ini.PadHandlerL3.SetValue(cbox_pad_l3->GetSelection());
|
||||
Ini.PadHandlerSelect.SetValue(cbox_pad_select->GetSelection());
|
||||
Ini.PadHandlerSquare.SetValue(cbox_pad_square->GetSelection());
|
||||
Ini.PadHandlerCross.SetValue(cbox_pad_cross->GetSelection());
|
||||
Ini.PadHandlerCircle.SetValue(cbox_pad_circle->GetSelection());
|
||||
Ini.PadHandlerTriangle.SetValue(cbox_pad_triangle->GetSelection());
|
||||
Ini.PadHandlerR1.SetValue(cbox_pad_r1->GetSelection());
|
||||
Ini.PadHandlerL1.SetValue(cbox_pad_l1->GetSelection());
|
||||
Ini.PadHandlerR2.SetValue(cbox_pad_r2->GetSelection());
|
||||
Ini.PadHandlerL2.SetValue(cbox_pad_l2->GetSelection());
|
||||
|
||||
Ini.Save();
|
||||
}
|
||||
|
||||
if(paused) Emu.Resume();
|
||||
PADManager(this).ShowModal();
|
||||
}
|
||||
|
||||
void MainFrame::ConfigVFS(wxCommandEvent& WXUNUSED(event))
|
||||
|
|
573
rpcs3/Gui/PADManager.cpp
Normal file
573
rpcs3/Gui/PADManager.cpp
Normal file
|
@ -0,0 +1,573 @@
|
|||
#include "stdafx.h"
|
||||
#include "PADManager.h"
|
||||
|
||||
PADManager::PADManager(wxWindow* parent)
|
||||
: wxDialog(parent, wxID_ANY, "PAD Settings", wxDefaultPosition)
|
||||
, m_button_id(0)
|
||||
, m_key_pressed(false)
|
||||
{
|
||||
bool paused = false;
|
||||
|
||||
if(Emu.IsRunning())
|
||||
{
|
||||
Emu.Pause();
|
||||
paused = true;
|
||||
}
|
||||
|
||||
wxBoxSizer* s_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
wxBoxSizer* s_subpanel(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel2(new wxBoxSizer(wxVERTICAL));
|
||||
|
||||
// Left Analog Stick
|
||||
wxStaticBoxSizer* s_round_stick_l( new wxStaticBoxSizer( wxVERTICAL, this, _("Left Analog Stick") ) );
|
||||
wxBoxSizer* s_subpanel_lstick_1( new wxBoxSizer( wxVERTICAL) );
|
||||
wxBoxSizer* s_subpanel_lstick_2( new wxBoxSizer( wxHORIZONTAL) );
|
||||
wxBoxSizer* s_subpanel_lstick_3( new wxBoxSizer( wxVERTICAL) );
|
||||
|
||||
// D-Pad
|
||||
wxStaticBoxSizer* s_round_pad_controls( new wxStaticBoxSizer( wxVERTICAL, this, _("D-Pad") ) );
|
||||
wxBoxSizer* s_subpanel_pad_1( new wxBoxSizer( wxVERTICAL) );
|
||||
wxBoxSizer* s_subpanel_pad_2( new wxBoxSizer( wxHORIZONTAL) );
|
||||
wxBoxSizer* s_subpanel_pad_3( new wxBoxSizer( wxVERTICAL) );
|
||||
|
||||
// Left shifts
|
||||
wxStaticBoxSizer* s_round_pad_shifts_l( new wxStaticBoxSizer( wxVERTICAL, this, _("Left Shifts") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l1( new wxStaticBoxSizer( wxVERTICAL, this, _("L1") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l2( new wxStaticBoxSizer( wxVERTICAL, this, _("L2") ) );
|
||||
wxStaticBoxSizer* s_round_pad_l3( new wxStaticBoxSizer( wxVERTICAL, this, _("L3") ) );
|
||||
|
||||
// Start / Select
|
||||
wxStaticBoxSizer* s_round_pad_system( new wxStaticBoxSizer( wxVERTICAL, this, _("System") ) );
|
||||
wxStaticBoxSizer* s_round_pad_select( new wxStaticBoxSizer( wxVERTICAL, this, _("Select") ) );
|
||||
wxStaticBoxSizer* s_round_pad_start( new wxStaticBoxSizer( wxVERTICAL, this, _("Start") ) );
|
||||
|
||||
// Right shifts
|
||||
wxStaticBoxSizer* s_round_pad_shifts_r( new wxStaticBoxSizer( wxVERTICAL, this, _("Right Shifts") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r1( new wxStaticBoxSizer( wxVERTICAL, this, _("R1") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r2( new wxStaticBoxSizer( wxVERTICAL, this, _("R2") ) );
|
||||
wxStaticBoxSizer* s_round_pad_r3( new wxStaticBoxSizer( wxVERTICAL, this, _("R3") ) );
|
||||
|
||||
// Action buttons
|
||||
wxStaticBoxSizer* s_round_pad_buttons( new wxStaticBoxSizer( wxVERTICAL, this, _("Buttons") ) );
|
||||
wxStaticBoxSizer* s_round_pad_square( new wxStaticBoxSizer( wxVERTICAL, this, _("Square") ) );
|
||||
wxStaticBoxSizer* s_round_pad_cross( new wxStaticBoxSizer( wxVERTICAL, this, _("Cross") ) );
|
||||
wxStaticBoxSizer* s_round_pad_circle( new wxStaticBoxSizer( wxVERTICAL, this, _("Circle") ) );
|
||||
wxStaticBoxSizer* s_round_pad_triangle( new wxStaticBoxSizer( wxVERTICAL, this, _("Triangle") ) );
|
||||
wxBoxSizer* s_subpanel_buttons_1( new wxBoxSizer( wxVERTICAL) );
|
||||
wxBoxSizer* s_subpanel_buttons_2( new wxBoxSizer( wxHORIZONTAL) );
|
||||
wxBoxSizer* s_subpanel_buttons_3( new wxBoxSizer( wxVERTICAL) );
|
||||
|
||||
// Right Analog Stick
|
||||
wxStaticBoxSizer* s_round_stick_r( new wxStaticBoxSizer( wxVERTICAL, this, _("Right Analog Stick") ) );
|
||||
wxBoxSizer* s_subpanel_rstick_1( new wxBoxSizer( wxVERTICAL) );
|
||||
wxBoxSizer* s_subpanel_rstick_2( new wxBoxSizer( wxHORIZONTAL) );
|
||||
wxBoxSizer* s_subpanel_rstick_3( new wxBoxSizer( wxVERTICAL) );
|
||||
|
||||
// Ok / Cancel
|
||||
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
|
||||
wxBoxSizer* s_reset_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
|
||||
#define ButtonParameters wxEmptyString, wxDefaultPosition, wxSize(60,-1)
|
||||
#define SizerFlags wxSizerFlags().Border(wxALL, 3).Center()
|
||||
|
||||
|
||||
// Buttons
|
||||
b_up_lstick = new wxButton(this, id_pad_lstick_up, ButtonParameters);
|
||||
b_down_lstick = new wxButton(this, id_pad_lstick_down, ButtonParameters);
|
||||
b_left_lstick = new wxButton(this, id_pad_lstick_left, ButtonParameters);
|
||||
b_right_lstick = new wxButton(this, id_pad_lstick_right, ButtonParameters);
|
||||
|
||||
b_up = new wxButton(this, id_pad_up, ButtonParameters);
|
||||
b_down = new wxButton(this, id_pad_down, ButtonParameters);
|
||||
b_left = new wxButton(this, id_pad_left, ButtonParameters);
|
||||
b_right = new wxButton(this, id_pad_right, ButtonParameters);
|
||||
|
||||
b_shift_l1 = new wxButton(this, id_pad_l1, ButtonParameters);
|
||||
b_shift_l2 = new wxButton(this, id_pad_l2, ButtonParameters);
|
||||
b_shift_l3 = new wxButton(this, id_pad_l3, ButtonParameters);
|
||||
|
||||
b_start = new wxButton(this, id_pad_start, ButtonParameters);
|
||||
b_select = new wxButton(this, id_pad_select, ButtonParameters);
|
||||
|
||||
b_shift_r1 = new wxButton(this, id_pad_r1, ButtonParameters);
|
||||
b_shift_r2 = new wxButton(this, id_pad_r2, ButtonParameters);
|
||||
b_shift_r3 = new wxButton(this, id_pad_r3, ButtonParameters);
|
||||
|
||||
b_square = new wxButton(this, id_pad_square, ButtonParameters);
|
||||
b_cross = new wxButton(this, id_pad_cross, ButtonParameters);
|
||||
b_circle = new wxButton(this, id_pad_circle, ButtonParameters);
|
||||
b_triangle = new wxButton(this, id_pad_triangle, ButtonParameters);
|
||||
|
||||
b_up_rstick = new wxButton(this, id_pad_rstick_up, ButtonParameters);
|
||||
b_down_rstick = new wxButton(this, id_pad_rstick_down, ButtonParameters);
|
||||
b_left_rstick = new wxButton(this, id_pad_rstick_left, ButtonParameters);
|
||||
b_right_rstick = new wxButton(this, id_pad_rstick_right, ButtonParameters);
|
||||
|
||||
b_ok = new wxButton(this, wxID_OK, "OK", wxDefaultPosition, wxSize(60,-1));
|
||||
b_cancel = new wxButton(this, wxID_CANCEL, "Cancel", wxDefaultPosition, wxSize(60,-1));
|
||||
b_reset = new wxButton(this, id_reset_parameters, "By default");
|
||||
|
||||
|
||||
// Get button labels from .ini
|
||||
UpdateLabel();
|
||||
|
||||
// Add buttons in subpanels
|
||||
// LStick
|
||||
s_subpanel_lstick_1->Add(b_up_lstick);
|
||||
s_subpanel_lstick_2->Add(b_left_lstick);
|
||||
s_subpanel_lstick_2->Add(b_right_lstick);
|
||||
s_subpanel_lstick_3->Add(b_down_lstick);
|
||||
|
||||
// D-Pad
|
||||
s_subpanel_pad_1->Add(b_up);
|
||||
s_subpanel_pad_2->Add(b_left);
|
||||
s_subpanel_pad_2->Add(b_right);
|
||||
s_subpanel_pad_3->Add(b_down);
|
||||
|
||||
// Left shifts
|
||||
s_round_pad_l1->Add(b_shift_l1);
|
||||
s_round_pad_l2->Add(b_shift_l2);
|
||||
s_round_pad_l3->Add(b_shift_l3);
|
||||
|
||||
// Start / Select
|
||||
s_round_pad_select->Add(b_select);
|
||||
s_round_pad_start->Add(b_start);
|
||||
|
||||
// Right shifts
|
||||
s_round_pad_r1->Add(b_shift_r1);
|
||||
s_round_pad_r2->Add(b_shift_r2);
|
||||
s_round_pad_r3->Add(b_shift_r3);
|
||||
|
||||
// Action buttons
|
||||
s_round_pad_square->Add(b_square);
|
||||
s_round_pad_cross->Add(b_cross);
|
||||
s_round_pad_circle->Add(b_circle);
|
||||
s_round_pad_triangle->Add(b_triangle);
|
||||
s_subpanel_buttons_1->Add(s_round_pad_triangle);
|
||||
s_subpanel_buttons_2->Add(s_round_pad_square);
|
||||
s_subpanel_buttons_2->Add(s_round_pad_circle);
|
||||
s_subpanel_buttons_3->Add(s_round_pad_cross);
|
||||
|
||||
// RStick
|
||||
s_subpanel_rstick_1->Add(b_up_rstick);
|
||||
s_subpanel_rstick_2->Add(b_left_rstick);
|
||||
s_subpanel_rstick_2->Add(b_right_rstick);
|
||||
s_subpanel_rstick_3->Add(b_down_rstick);
|
||||
|
||||
// Ok / Cancel
|
||||
s_b_panel->Add(b_ok);
|
||||
s_b_panel->Add(b_cancel);
|
||||
|
||||
// Reset parameters
|
||||
s_reset_panel->Add(b_reset);
|
||||
|
||||
s_round_stick_l->Add(s_subpanel_lstick_1, SizerFlags);
|
||||
s_round_stick_l->Add(s_subpanel_lstick_2, SizerFlags);
|
||||
s_round_stick_l->Add(s_subpanel_lstick_3, SizerFlags);
|
||||
|
||||
s_round_pad_controls->Add(s_subpanel_pad_1, SizerFlags);
|
||||
s_round_pad_controls->Add(s_subpanel_pad_2, SizerFlags);
|
||||
s_round_pad_controls->Add(s_subpanel_pad_3, SizerFlags);
|
||||
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l1, SizerFlags);
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l2, SizerFlags);
|
||||
s_round_pad_shifts_l->Add(s_round_pad_l3, SizerFlags);
|
||||
|
||||
s_round_pad_system->Add(s_round_pad_select, SizerFlags);
|
||||
s_round_pad_system->Add(s_round_pad_start, SizerFlags);
|
||||
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r1, SizerFlags);
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r2, SizerFlags);
|
||||
s_round_pad_shifts_r->Add(s_round_pad_r3, SizerFlags);
|
||||
|
||||
s_round_pad_buttons->Add(s_subpanel_buttons_1, SizerFlags);
|
||||
s_round_pad_buttons->Add(s_subpanel_buttons_2, SizerFlags);
|
||||
s_round_pad_buttons->Add(s_subpanel_buttons_3, SizerFlags);
|
||||
|
||||
s_round_stick_r->Add(s_subpanel_rstick_1, SizerFlags);
|
||||
s_round_stick_r->Add(s_subpanel_rstick_2, SizerFlags);
|
||||
s_round_stick_r->Add(s_subpanel_rstick_3, SizerFlags);
|
||||
|
||||
|
||||
s_subpanel->Add(s_round_stick_l);
|
||||
s_subpanel->AddSpacer(50);
|
||||
s_subpanel->Add(s_b_panel, SizerFlags);
|
||||
|
||||
s_subpanel2->Add(s_round_pad_controls);
|
||||
s_subpanel2->AddSpacer(50);
|
||||
s_subpanel2->Add(s_reset_panel, SizerFlags);
|
||||
|
||||
// Add subpanels in general panel
|
||||
s_panel->Add(s_subpanel);
|
||||
s_panel->Add(s_subpanel2);
|
||||
s_panel->Add(s_round_pad_shifts_l);
|
||||
s_panel->Add(s_round_pad_system);
|
||||
s_panel->Add(s_round_pad_shifts_r);
|
||||
s_panel->Add(s_round_pad_buttons);
|
||||
s_panel->Add(s_round_stick_r);
|
||||
|
||||
this->SetSizerAndFit(s_panel);
|
||||
|
||||
// Connect buttons
|
||||
m_app_connector.Connect(wxID_ANY, wxEVT_KEY_UP, wxKeyEventHandler(PADManager::OnKeyUp), (wxObject*)0, this);
|
||||
m_app_connector.Connect(wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(PADManager::OnKeyDown), (wxObject*)0, this);
|
||||
Connect(b_up_lstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_down_lstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_left_lstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_right_lstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_up->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (PADManager::OnButtonClicked));
|
||||
Connect(b_down->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_left->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_right->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_shift_l1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_shift_l2->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_shift_l3->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_start->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_select->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_shift_r1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_shift_r2->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_shift_r3->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_square->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_cross->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_circle->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_triangle->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_up_rstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_down_rstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_left_rstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_right_rstick->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
Connect(b_ok->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_reset->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
Connect(b_cancel->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(PADManager::OnButtonClicked));
|
||||
|
||||
if(paused) Emu.Resume();
|
||||
}
|
||||
|
||||
void PADManager::OnKeyDown(wxKeyEvent &keyEvent)
|
||||
{
|
||||
m_key_pressed = true;
|
||||
|
||||
switch (m_button_id)
|
||||
{
|
||||
case id_pad_lstick_left: Ini.PadHandlerLStickLeft.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_lstick_down: Ini.PadHandlerLStickDown.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_lstick_right: Ini.PadHandlerLStickRight.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_lstick_up: Ini.PadHandlerLStickUp.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_left: Ini.PadHandlerLeft.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_down: Ini.PadHandlerDown.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_right: Ini.PadHandlerRight.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_up: Ini.PadHandlerUp.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_l1: Ini.PadHandlerL1.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_l2: Ini.PadHandlerL2.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_l3: Ini.PadHandlerL3.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_start: Ini.PadHandlerStart.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_select: Ini.PadHandlerSelect.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_r1: Ini.PadHandlerR1.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_r2: Ini.PadHandlerR2.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_r3: Ini.PadHandlerR3.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_square: Ini.PadHandlerSquare.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_cross: Ini.PadHandlerCross.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_circle: Ini.PadHandlerCircle.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_triangle: Ini.PadHandlerTriangle.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case id_pad_rstick_left: Ini.PadHandlerRStickLeft.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_rstick_down: Ini.PadHandlerRStickDown.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_rstick_right: Ini.PadHandlerRStickRight.SetValue(keyEvent.GetKeyCode()); break;
|
||||
case id_pad_rstick_up: Ini.PadHandlerRStickUp.SetValue(keyEvent.GetKeyCode()); break;
|
||||
|
||||
case 0: break;
|
||||
default: ConLog.Error("Unknown button ID: %d", m_button_id); break;
|
||||
}
|
||||
|
||||
UpdateLabel();
|
||||
keyEvent.Skip();
|
||||
}
|
||||
|
||||
void PADManager::OnKeyUp(wxKeyEvent &keyEvent)
|
||||
{
|
||||
SwitchButtons(true); // enable all buttons
|
||||
m_button_id = 0; // reset current button id
|
||||
m_key_pressed = false;
|
||||
keyEvent.Skip();
|
||||
}
|
||||
|
||||
void PADManager::OnButtonClicked(wxCommandEvent &event)
|
||||
{
|
||||
if (event.GetId() != wxID_OK && event.GetId() != wxID_CANCEL && event.GetId() != id_reset_parameters)
|
||||
{
|
||||
m_button_id = event.GetId();
|
||||
SwitchButtons(false); // disable all buttons, needed for using Space, Enter and other specific buttons
|
||||
//RunTimer(3, event.GetId()); // TODO: Currently, timer disabled. Use by later, have some strange problems
|
||||
//SwitchButtons(true); // needed, if timer enabled
|
||||
UpdateLabel();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
switch (event.GetId())
|
||||
{
|
||||
case id_reset_parameters: ResetParameters(); UpdateLabel(); break;
|
||||
case wxID_OK: Ini.Save(); break;
|
||||
case wxID_CANCEL: break;
|
||||
|
||||
default: ConLog.Error("Unknown button ID: %d", event.GetId()); break;
|
||||
}
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
const wxString PADManager::GetKeyName(const u32 keyCode)
|
||||
{
|
||||
wxString keyName;
|
||||
|
||||
switch(keyCode)
|
||||
{
|
||||
case WXK_NONE: ConLog.Error("Invalid key code"); keyName = "ERROR!"; break;
|
||||
case WXK_BACK: keyName = "BackSpace"; break;
|
||||
case WXK_TAB: keyName = "Tab"; break;
|
||||
case WXK_RETURN: keyName = "Enter"; break;
|
||||
case WXK_ESCAPE: keyName = "Esc"; break;
|
||||
case WXK_SPACE: keyName = "Space"; break;
|
||||
case WXK_DELETE: keyName = "Delete"; break;
|
||||
case WXK_SHIFT: keyName = "Shift"; break;
|
||||
case WXK_ALT: keyName = "ALT"; break;
|
||||
case WXK_CONTROL: keyName = "CTRL"; break;
|
||||
case WXK_PAUSE: keyName = "Pause"; break;
|
||||
case WXK_CAPITAL: keyName = "CapsLock"; break;
|
||||
case WXK_END: keyName = "End"; break;
|
||||
case WXK_HOME: keyName = "Home"; break;
|
||||
case WXK_LEFT: keyName = "Left"; break;
|
||||
case WXK_UP: keyName = "Up"; break;
|
||||
case WXK_RIGHT: keyName = "Right"; break;
|
||||
case WXK_DOWN: keyName = "Down"; break;
|
||||
case WXK_SELECT: keyName = "Select"; break;
|
||||
case WXK_PRINT: keyName = "Print"; break;
|
||||
case WXK_SNAPSHOT: keyName = "Snapshot"; break;
|
||||
case WXK_INSERT: keyName = "Insert"; break;
|
||||
case WXK_NUMPAD0: keyName = "Num0"; break;
|
||||
case WXK_NUMPAD1: keyName = "Num1"; break;
|
||||
case WXK_NUMPAD2: keyName = "Num2"; break;
|
||||
case WXK_NUMPAD3: keyName = "Num3"; break;
|
||||
case WXK_NUMPAD4: keyName = "Num4"; break;
|
||||
case WXK_NUMPAD5: keyName = "Num5"; break;
|
||||
case WXK_NUMPAD6: keyName = "Num6"; break;
|
||||
case WXK_NUMPAD7: keyName = "Num7"; break;
|
||||
case WXK_NUMPAD8: keyName = "Num8"; break;
|
||||
case WXK_NUMPAD9: keyName = "Num9"; break;
|
||||
case WXK_F1: keyName = "F1"; break;
|
||||
case WXK_F2: keyName = "F2"; break;
|
||||
case WXK_F3: keyName = "F3"; break;
|
||||
case WXK_F4: keyName = "F4"; break;
|
||||
case WXK_F5: keyName = "F5"; break;
|
||||
case WXK_F6: keyName = "F6"; break;
|
||||
case WXK_F7: keyName = "F7"; break;
|
||||
case WXK_F8: keyName = "F8"; break;
|
||||
case WXK_F9: keyName = "F9"; break;
|
||||
case WXK_F10: keyName = "F10"; break;
|
||||
case WXK_F11: keyName = "F11"; break;
|
||||
case WXK_F12: keyName = "F12"; break;
|
||||
case WXK_NUMLOCK: keyName = "NumLock"; break;
|
||||
case WXK_SCROLL: keyName = "ScrollLock"; break;
|
||||
case WXK_PAGEUP: keyName = "PgUp"; break;
|
||||
case WXK_PAGEDOWN: keyName = "PgDn"; break;
|
||||
case WXK_NUMPAD_SPACE: keyName = "NumSpace"; break;
|
||||
case WXK_NUMPAD_TAB: keyName = "NumTab"; break;
|
||||
case WXK_NUMPAD_ENTER: keyName = "NumEnter"; break;
|
||||
case WXK_NUMPAD_HOME: keyName = "NumHome"; break;
|
||||
case WXK_NUMPAD_LEFT: keyName = "NumLeft"; break;
|
||||
case WXK_NUMPAD_UP: keyName = "NumUp"; break;
|
||||
case WXK_NUMPAD_RIGHT: keyName = "NumRight"; break;
|
||||
case WXK_NUMPAD_DOWN: keyName = "NumDown"; break;
|
||||
case WXK_NUMPAD_PAGEUP: keyName = "NumPgUp"; break;
|
||||
case WXK_NUMPAD_PAGEDOWN: keyName = "NumPgDn"; break;
|
||||
case WXK_NUMPAD_END: keyName = "NumEnd"; break;
|
||||
case WXK_NUMPAD_BEGIN: keyName = "NumHome"; break;
|
||||
case WXK_NUMPAD_INSERT: keyName = "NumIns"; break;
|
||||
case WXK_NUMPAD_DELETE: keyName = "NumDel"; break;
|
||||
|
||||
default: keyName = static_cast<char>(keyCode); break;
|
||||
}
|
||||
|
||||
return keyName;
|
||||
}
|
||||
|
||||
void PADManager::UpdateLabel()
|
||||
{
|
||||
// Get button labels from .ini
|
||||
b_up_lstick->SetLabel(GetKeyName(Ini.PadHandlerLStickUp.GetValue()));
|
||||
b_down_lstick->SetLabel(GetKeyName(Ini.PadHandlerLStickDown.GetValue()));
|
||||
b_left_lstick->SetLabel(GetKeyName(Ini.PadHandlerLStickLeft.GetValue()));
|
||||
b_right_lstick->SetLabel(GetKeyName(Ini.PadHandlerLStickRight.GetValue()));
|
||||
|
||||
b_up->SetLabel(GetKeyName(Ini.PadHandlerUp.GetValue()));
|
||||
b_down->SetLabel(GetKeyName(Ini.PadHandlerDown.GetValue()));
|
||||
b_left->SetLabel(GetKeyName(Ini.PadHandlerLeft.GetValue()));
|
||||
b_right->SetLabel(GetKeyName(Ini.PadHandlerRight.GetValue()));
|
||||
|
||||
b_shift_l1->SetLabel(GetKeyName(Ini.PadHandlerL1.GetValue()));
|
||||
b_shift_l2->SetLabel(GetKeyName(Ini.PadHandlerL2.GetValue()));
|
||||
b_shift_l3->SetLabel(GetKeyName(Ini.PadHandlerL3.GetValue()));
|
||||
|
||||
b_start->SetLabel(GetKeyName(Ini.PadHandlerStart.GetValue()));
|
||||
b_select->SetLabel(GetKeyName(Ini.PadHandlerSelect.GetValue()));
|
||||
|
||||
b_shift_r1->SetLabel(GetKeyName(Ini.PadHandlerR1.GetValue()));
|
||||
b_shift_r2->SetLabel(GetKeyName(Ini.PadHandlerR2.GetValue()));
|
||||
b_shift_r3->SetLabel(GetKeyName(Ini.PadHandlerR3.GetValue()));
|
||||
|
||||
b_square->SetLabel(GetKeyName(Ini.PadHandlerSquare.GetValue()));
|
||||
b_cross->SetLabel(GetKeyName(Ini.PadHandlerCross.GetValue()));
|
||||
b_circle->SetLabel(GetKeyName(Ini.PadHandlerCircle.GetValue()));
|
||||
b_triangle->SetLabel(GetKeyName(Ini.PadHandlerTriangle.GetValue()));
|
||||
|
||||
b_up_rstick->SetLabel(GetKeyName(Ini.PadHandlerRStickUp.GetValue()));
|
||||
b_down_rstick->SetLabel(GetKeyName(Ini.PadHandlerRStickDown.GetValue()));
|
||||
b_left_rstick->SetLabel(GetKeyName(Ini.PadHandlerRStickLeft.GetValue()));
|
||||
b_right_rstick->SetLabel(GetKeyName(Ini.PadHandlerRStickRight.GetValue()));
|
||||
}
|
||||
|
||||
void PADManager::ResetParameters()
|
||||
{
|
||||
Ini.PadHandlerLStickUp.SetValue(315);
|
||||
Ini.PadHandlerLStickDown.SetValue(317);
|
||||
Ini.PadHandlerLStickLeft.SetValue(314);
|
||||
Ini.PadHandlerLStickRight.SetValue(316);
|
||||
|
||||
Ini.PadHandlerUp.SetValue(static_cast<int>('W'));
|
||||
Ini.PadHandlerDown.SetValue(static_cast<int>('S'));
|
||||
Ini.PadHandlerLeft.SetValue(static_cast<int>('A'));
|
||||
Ini.PadHandlerRight.SetValue(static_cast<int>('D'));
|
||||
|
||||
Ini.PadHandlerL1.SetValue(static_cast<int>('1'));
|
||||
Ini.PadHandlerL2.SetValue(static_cast<int>('Q'));
|
||||
Ini.PadHandlerL3.SetValue(static_cast<int>('Z'));
|
||||
|
||||
Ini.PadHandlerStart.SetValue(13);
|
||||
Ini.PadHandlerSelect.SetValue(32);
|
||||
|
||||
Ini.PadHandlerR1.SetValue(static_cast<int>('3'));
|
||||
Ini.PadHandlerR2.SetValue(static_cast<int>('E'));
|
||||
Ini.PadHandlerR3.SetValue(static_cast<int>('C'));
|
||||
|
||||
Ini.PadHandlerSquare.SetValue(static_cast<int>('J'));
|
||||
Ini.PadHandlerCross.SetValue(static_cast<int>('K'));
|
||||
Ini.PadHandlerCircle.SetValue(static_cast<int>('L'));
|
||||
Ini.PadHandlerTriangle.SetValue(static_cast<int>('I'));
|
||||
|
||||
Ini.PadHandlerRStickUp.SetValue(366);
|
||||
Ini.PadHandlerRStickDown.SetValue(367);
|
||||
Ini.PadHandlerRStickLeft.SetValue(313);
|
||||
Ini.PadHandlerRStickRight.SetValue(312);
|
||||
}
|
||||
|
||||
void PADManager::UpdateTimerLabel(const u32 id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case id_pad_lstick_left: b_left_lstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_lstick_down: b_down_lstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_lstick_right: b_right_lstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_lstick_up: b_up_lstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_left: b_left->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_down: b_down->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_right: b_right->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_up: b_up->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_l1: b_shift_l1->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_l2: b_shift_l2->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_l3: b_shift_l3->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_start: b_start->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_select: b_select->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_r1: b_shift_r1->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_r2: b_shift_r2->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_r3: b_shift_r3->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_square: b_square->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_cross: b_cross->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_circle: b_circle->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_triangle: b_triangle->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
case id_pad_rstick_left: b_left_rstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_rstick_down: b_down_rstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_rstick_right: b_right_rstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
case id_pad_rstick_up: b_up_rstick->SetLabel(static_cast<char>(m_seconds + 47)); break;
|
||||
|
||||
default: ConLog.Error("Unknown button ID: %d", id); break;
|
||||
}
|
||||
}
|
||||
|
||||
void PADManager::SwitchButtons(const bool IsEnabled)
|
||||
{
|
||||
b_up_lstick->Enable(IsEnabled);
|
||||
b_down_lstick->Enable(IsEnabled);
|
||||
b_left_lstick->Enable(IsEnabled);
|
||||
b_right_lstick->Enable(IsEnabled);
|
||||
|
||||
b_up->Enable(IsEnabled);
|
||||
b_down->Enable(IsEnabled);
|
||||
b_left->Enable(IsEnabled);
|
||||
b_right->Enable(IsEnabled);
|
||||
|
||||
b_shift_l1->Enable(IsEnabled);
|
||||
b_shift_l2->Enable(IsEnabled);
|
||||
b_shift_l3->Enable(IsEnabled);
|
||||
|
||||
b_start->Enable(IsEnabled);
|
||||
b_select->Enable(IsEnabled);
|
||||
|
||||
b_shift_r1->Enable(IsEnabled);
|
||||
b_shift_r2->Enable(IsEnabled);
|
||||
b_shift_r3->Enable(IsEnabled);
|
||||
|
||||
b_square->Enable(IsEnabled);
|
||||
b_cross->Enable(IsEnabled);
|
||||
b_circle->Enable(IsEnabled);
|
||||
b_triangle->Enable(IsEnabled);
|
||||
|
||||
b_up_rstick->Enable(IsEnabled);
|
||||
b_down_rstick->Enable(IsEnabled);
|
||||
b_left_rstick->Enable(IsEnabled);
|
||||
b_right_rstick->Enable(IsEnabled);
|
||||
|
||||
b_ok->Enable(IsEnabled);
|
||||
b_cancel->Enable(IsEnabled);
|
||||
b_reset->Enable(IsEnabled);
|
||||
}
|
||||
|
||||
void PADManager::RunTimer(const u32 seconds, const u32 id)
|
||||
{
|
||||
m_seconds = seconds;
|
||||
clock_t t1, t2;
|
||||
t1 = t2 = clock() / CLOCKS_PER_SEC;
|
||||
while (m_seconds)
|
||||
{
|
||||
if (t1 / CLOCKS_PER_SEC + 1 <= (t2 = clock()) / CLOCKS_PER_SEC)
|
||||
{
|
||||
UpdateTimerLabel(id);
|
||||
m_seconds--;
|
||||
t1 = t2;
|
||||
}
|
||||
|
||||
if(m_key_pressed)
|
||||
{
|
||||
m_seconds = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
102
rpcs3/Gui/PADManager.h
Normal file
102
rpcs3/Gui/PADManager.h
Normal file
|
@ -0,0 +1,102 @@
|
|||
#include "Ini.h"
|
||||
#include <time.h>
|
||||
|
||||
enum ButtonIDs
|
||||
{
|
||||
id_pad_lstick_left = 0x777,
|
||||
id_pad_lstick_down,
|
||||
id_pad_lstick_right,
|
||||
id_pad_lstick_up,
|
||||
|
||||
id_pad_left,
|
||||
id_pad_down,
|
||||
id_pad_right,
|
||||
id_pad_up,
|
||||
|
||||
id_pad_l1,
|
||||
id_pad_l2,
|
||||
id_pad_l3,
|
||||
|
||||
id_pad_start,
|
||||
id_pad_select,
|
||||
|
||||
id_pad_r1,
|
||||
id_pad_r2,
|
||||
id_pad_r3,
|
||||
|
||||
id_pad_square,
|
||||
id_pad_cross,
|
||||
id_pad_circle,
|
||||
id_pad_triangle,
|
||||
|
||||
id_pad_rstick_left,
|
||||
id_pad_rstick_down,
|
||||
id_pad_rstick_right,
|
||||
id_pad_rstick_up,
|
||||
|
||||
id_reset_parameters,
|
||||
};
|
||||
|
||||
struct PadButtons
|
||||
{
|
||||
wxButton* b_up_lstick;
|
||||
wxButton* b_down_lstick;
|
||||
wxButton* b_left_lstick;
|
||||
wxButton* b_right_lstick;
|
||||
|
||||
wxButton* b_up;
|
||||
wxButton* b_down;
|
||||
wxButton* b_left;
|
||||
wxButton* b_right;
|
||||
|
||||
wxButton* b_shift_l1;
|
||||
wxButton* b_shift_l2;
|
||||
wxButton* b_shift_l3;
|
||||
|
||||
wxButton* b_start;
|
||||
wxButton* b_select;
|
||||
|
||||
wxButton* b_shift_r1;
|
||||
wxButton* b_shift_r2;
|
||||
wxButton* b_shift_r3;
|
||||
|
||||
|
||||
wxButton* b_square;
|
||||
wxButton* b_cross;
|
||||
wxButton* b_circle;
|
||||
wxButton* b_triangle;
|
||||
|
||||
wxButton* b_up_rstick;
|
||||
wxButton* b_down_rstick;
|
||||
wxButton* b_left_rstick;
|
||||
wxButton* b_right_rstick;
|
||||
|
||||
wxButton* b_ok;
|
||||
wxButton* b_cancel;
|
||||
wxButton* b_reset;
|
||||
};
|
||||
|
||||
class PADManager : public wxDialog, PadButtons
|
||||
{
|
||||
private:
|
||||
AppConnector m_app_connector;
|
||||
u32 m_seconds;
|
||||
u32 m_button_id;
|
||||
bool m_key_pressed;
|
||||
|
||||
public:
|
||||
PADManager(wxWindow* parent);
|
||||
~PADManager()
|
||||
{
|
||||
}
|
||||
|
||||
void OnKeyDown(wxKeyEvent &keyEvent);
|
||||
void OnKeyUp(wxKeyEvent &keyEvent);
|
||||
void OnButtonClicked(wxCommandEvent &event);
|
||||
void UpdateLabel();
|
||||
void ResetParameters();
|
||||
void UpdateTimerLabel(const u32 id);
|
||||
void SwitchButtons(const bool IsEnabled);
|
||||
const wxString GetKeyName(const u32 keyCode);
|
||||
void RunTimer(const u32 seconds, const u32 id);
|
||||
};
|
63
rpcs3/Ini.h
63
rpcs3/Ini.h
|
@ -25,19 +25,19 @@ protected:
|
|||
wxConfigBase* m_Config;
|
||||
|
||||
Ini();
|
||||
virtual void Save(const wxString& key, int value);
|
||||
virtual void Save(const wxString& key, bool value);
|
||||
virtual void Save(const wxString& key, wxSize value);
|
||||
virtual void Save(const wxString& key, wxPoint value);
|
||||
virtual void Save(const wxString& key, const std::string& value);
|
||||
virtual void Save(const wxString& key, WindowInfo value);
|
||||
void Save(const wxString& key, int value);
|
||||
void Save(const wxString& key, bool value);
|
||||
void Save(const wxString& key, wxSize value);
|
||||
void Save(const wxString& key, wxPoint value);
|
||||
void Save(const wxString& key, const std::string& value);
|
||||
void Save(const wxString& key, WindowInfo value);
|
||||
|
||||
virtual int Load(const wxString& key, const int def_value);
|
||||
virtual bool Load(const wxString& key, const bool def_value);
|
||||
virtual wxSize Load(const wxString& key, const wxSize def_value);
|
||||
virtual wxPoint Load(const wxString& key, const wxPoint def_value);
|
||||
virtual std::string Load(const wxString& key, const std::string& def_value);
|
||||
virtual WindowInfo Load(const wxString& key, const WindowInfo& def_value);
|
||||
int Load(const wxString& key, const int def_value);
|
||||
bool Load(const wxString& key, const bool def_value);
|
||||
wxSize Load(const wxString& key, const wxSize def_value);
|
||||
wxPoint Load(const wxString& key, const wxPoint def_value);
|
||||
std::string Load(const wxString& key, const std::string& def_value);
|
||||
WindowInfo Load(const wxString& key, const WindowInfo& def_value);
|
||||
};
|
||||
|
||||
template<typename T> struct IniEntry : public Ini
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
IniEntry<u8> CPUDecoderMode;
|
||||
IniEntry<bool> CPUIgnoreRWErrors;
|
||||
IniEntry<u8> GSRenderMode;
|
||||
IniEntry<int> GSResolution;
|
||||
IniEntry<u8> GSResolution;
|
||||
IniEntry<u8> GSAspectRatio;
|
||||
IniEntry<bool> GSVSyncEnable;
|
||||
IniEntry<bool> GSLogPrograms;
|
||||
|
@ -113,6 +113,10 @@ public:
|
|||
IniEntry<u8> HLELogLvl;
|
||||
IniEntry<u8> SysLanguage;
|
||||
|
||||
IniEntry<int> PadHandlerLStickLeft;
|
||||
IniEntry<int> PadHandlerLStickDown;
|
||||
IniEntry<int> PadHandlerLStickRight;
|
||||
IniEntry<int> PadHandlerLStickUp;
|
||||
IniEntry<int> PadHandlerLeft;
|
||||
IniEntry<int> PadHandlerDown;
|
||||
IniEntry<int> PadHandlerRight;
|
||||
|
@ -129,6 +133,10 @@ public:
|
|||
IniEntry<int> PadHandlerL1;
|
||||
IniEntry<int> PadHandlerR2;
|
||||
IniEntry<int> PadHandlerL2;
|
||||
IniEntry<int> PadHandlerRStickLeft;
|
||||
IniEntry<int> PadHandlerRStickDown;
|
||||
IniEntry<int> PadHandlerRStickRight;
|
||||
IniEntry<int> PadHandlerRStickUp;
|
||||
|
||||
public:
|
||||
Inis() : DefPath("EmuSettings")
|
||||
|
@ -154,6 +162,10 @@ public:
|
|||
MouseHandlerMode.Init("MouseHandlerMode", path);
|
||||
|
||||
path = DefPath + "/" + "ControlSetings";
|
||||
PadHandlerLStickLeft.Init("PadHandlerLStickLeft", path);
|
||||
PadHandlerLStickDown.Init("PadHandlerLStickDown", path);
|
||||
PadHandlerLStickRight.Init("PadHandlerLStickRight", path);
|
||||
PadHandlerLStickUp.Init("PadHandlerLStickUp", path);
|
||||
PadHandlerLeft.Init("PadHandlerLeft", path);
|
||||
PadHandlerDown.Init("PadHandlerDown", path);
|
||||
PadHandlerRight.Init("PadHandlerRight", path);
|
||||
|
@ -170,6 +182,11 @@ public:
|
|||
PadHandlerL1.Init("PadHandlerL1", path);
|
||||
PadHandlerR2.Init("PadHandlerR2", path);
|
||||
PadHandlerL2.Init("PadHandlerL2", path);
|
||||
PadHandlerRStickLeft.Init("PadHandlerRStickLeft", path);
|
||||
PadHandlerRStickDown.Init("PadHandlerRStickDown", path);
|
||||
PadHandlerRStickRight.Init("PadHandlerRStickRight", path);
|
||||
PadHandlerRStickUp.Init("PadHandlerRStickUp", path);
|
||||
|
||||
|
||||
path = DefPath + "/" + "Audio";
|
||||
AudioOutMode.Init("AudioOutMode", path);
|
||||
|
@ -209,14 +226,18 @@ public:
|
|||
HLELogLvl.Load(0);
|
||||
SysLanguage.Load(1);
|
||||
|
||||
PadHandlerLStickLeft.Load(314); //WXK_LEFT
|
||||
PadHandlerLStickDown.Load(317); //WXK_DOWN
|
||||
PadHandlerLStickRight.Load(316); //WXK_RIGHT
|
||||
PadHandlerLStickUp.Load(315); //WXK_UP
|
||||
PadHandlerLeft.Load(static_cast<int>('A'));
|
||||
PadHandlerDown.Load(static_cast<int>('S'));
|
||||
PadHandlerRight.Load(static_cast<int>('D'));
|
||||
PadHandlerUp.Load(static_cast<int>('W'));
|
||||
PadHandlerStart.Load(0);
|
||||
PadHandlerStart.Load(13); //WXK_RETURN
|
||||
PadHandlerR3.Load(static_cast<int>('C'));
|
||||
PadHandlerL3.Load(static_cast<int>('Z'));
|
||||
PadHandlerSelect.Load(0);
|
||||
PadHandlerSelect.Load(32); //WXK_SPACE
|
||||
PadHandlerSquare.Load(static_cast<int>('J'));
|
||||
PadHandlerCross.Load(static_cast<int>('K'));
|
||||
PadHandlerCircle.Load(static_cast<int>('L'));
|
||||
|
@ -225,6 +246,10 @@ public:
|
|||
PadHandlerL1.Load(static_cast<int>('1'));
|
||||
PadHandlerR2.Load(static_cast<int>('E'));
|
||||
PadHandlerL2.Load(static_cast<int>('Q'));
|
||||
PadHandlerRStickLeft.Load(313); //WXK_HOME
|
||||
PadHandlerRStickDown.Load(367); //WXK_PAGEDOWN
|
||||
PadHandlerRStickRight.Load(312); //WXK_END
|
||||
PadHandlerRStickUp.Load(366); //WXK_PAGEUP
|
||||
}
|
||||
|
||||
void Save()
|
||||
|
@ -250,6 +275,10 @@ public:
|
|||
HLELogLvl.Save();
|
||||
SysLanguage.Save();
|
||||
|
||||
PadHandlerLStickLeft.Save();
|
||||
PadHandlerLStickDown.Save();
|
||||
PadHandlerLStickRight.Save();
|
||||
PadHandlerLStickUp.Save();
|
||||
PadHandlerLeft.Save();
|
||||
PadHandlerDown.Save();
|
||||
PadHandlerRight.Save();
|
||||
|
@ -266,6 +295,10 @@ public:
|
|||
PadHandlerL1.Save();
|
||||
PadHandlerR2.Save();
|
||||
PadHandlerL2.Save();
|
||||
PadHandlerRStickLeft.Save();
|
||||
PadHandlerRStickDown.Save();
|
||||
PadHandlerRStickRight.Save();
|
||||
PadHandlerRStickUp.Save();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
|
@ -332,6 +332,7 @@
|
|||
<ClCompile Include="Gui\InterpreterDisAsm.cpp" />
|
||||
<ClCompile Include="Gui\MainFrame.cpp" />
|
||||
<ClCompile Include="Gui\MemoryViewer.cpp" />
|
||||
<ClCompile Include="Gui\PADManager.cpp" />
|
||||
<ClCompile Include="Gui\RSXDebugger.cpp" />
|
||||
<ClCompile Include="Gui\TextInputDialog.cpp" />
|
||||
<ClCompile Include="Gui\VFSManager.cpp" />
|
||||
|
@ -367,6 +368,7 @@
|
|||
<ClInclude Include="..\Utilities\StrFmt.h" />
|
||||
<ClInclude Include="..\Utilities\Thread.h" />
|
||||
<ClInclude Include="..\Utilities\Timer.h" />
|
||||
<ClInclude Include="AppConnector.h" />
|
||||
<ClInclude Include="Crypto\aes.h" />
|
||||
<ClInclude Include="Crypto\key_vault.h" />
|
||||
<ClInclude Include="Crypto\sha1.h" />
|
||||
|
@ -374,6 +376,13 @@
|
|||
<ClInclude Include="Crypto\unpkg.h" />
|
||||
<ClInclude Include="Crypto\unself.h" />
|
||||
<ClInclude Include="Crypto\utils.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Decoder.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7DisAsm.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Interpreter.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Opcodes.h" />
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h" />
|
||||
<ClInclude Include="Emu\Audio\AL\OpenALThread.h" />
|
||||
<ClInclude Include="Emu\Audio\AudioDumper.h" />
|
||||
<ClInclude Include="Emu\Audio\AudioManager.h" />
|
||||
<ClInclude Include="Emu\Cell\MFC.h" />
|
||||
<ClInclude Include="Emu\Cell\PPCDecoder.h" />
|
||||
|
@ -396,36 +405,115 @@
|
|||
<ClInclude Include="Emu\Cell\SPURecompiler.h" />
|
||||
<ClInclude Include="Emu\Cell\SPURSManager.h" />
|
||||
<ClInclude Include="Emu\Cell\SPUThread.h" />
|
||||
<ClInclude Include="Emu\CPU\CPUDecoder.h" />
|
||||
<ClInclude Include="Emu\CPU\CPUDisAsm.h" />
|
||||
<ClInclude Include="Emu\CPU\CPUInstrTable.h" />
|
||||
<ClInclude Include="Emu\CPU\CPUThread.h" />
|
||||
<ClInclude Include="Emu\CPU\CPUThreadManager.h" />
|
||||
<ClInclude Include="Emu\DbgConsole.h" />
|
||||
<ClInclude Include="Emu\FS\VFS.h" />
|
||||
<ClInclude Include="Emu\FS\vfsDevice.h" />
|
||||
<ClInclude Include="Emu\FS\vfsDeviceLocalFile.h" />
|
||||
<ClInclude Include="Emu\FS\vfsDir.h" />
|
||||
<ClInclude Include="Emu\FS\vfsDirBase.h" />
|
||||
<ClInclude Include="Emu\FS\vfsFile.h" />
|
||||
<ClInclude Include="Emu\FS\vfsFileBase.h" />
|
||||
<ClInclude Include="Emu\FS\vfsLocalDir.h" />
|
||||
<ClInclude Include="Emu\FS\vfsLocalFile.h" />
|
||||
<ClInclude Include="Emu\FS\vfsStream.h" />
|
||||
<ClInclude Include="Emu\FS\vfsStreamMemory.h" />
|
||||
<ClInclude Include="Emu\GameInfo.h" />
|
||||
<ClInclude Include="Emu\GS\GCM.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLBuffers.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLFragmentProgram.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLGSRender.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLProgram.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLProgramBuffer.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLShaderParam.h" />
|
||||
<ClInclude Include="Emu\GS\GL\GLVertexProgram.h" />
|
||||
<ClInclude Include="Emu\GS\GL\OpenGL.h" />
|
||||
<ClInclude Include="Emu\GS\GSManager.h" />
|
||||
<ClInclude Include="Emu\GS\GSRender.h" />
|
||||
<ClInclude Include="Emu\GS\Null\NullGSRender.h" />
|
||||
<ClInclude Include="Emu\GS\RSXFragmentProgram.h" />
|
||||
<ClInclude Include="Emu\GS\RSXTexture.h" />
|
||||
<ClInclude Include="Emu\GS\RSXThread.h" />
|
||||
<ClInclude Include="Emu\GS\RSXVertexProgram.h" />
|
||||
<ClInclude Include="Emu\HDD\HDD.h" />
|
||||
<ClInclude Include="Emu\Io\Keyboard.h" />
|
||||
<ClInclude Include="Emu\Io\KeyboardHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Mouse.h" />
|
||||
<ClInclude Include="Emu\Io\MouseHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Null\NullPadHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Pad.h" />
|
||||
<ClInclude Include="Emu\Io\PadHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsKeyboardHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsMouseHandler.h" />
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsPadHandler.h" />
|
||||
<ClInclude Include="Emu\Memory\Memory.h" />
|
||||
<ClInclude Include="Emu\Memory\MemoryBlock.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Callback.h" />
|
||||
<ClInclude Include="Emu\SysCalls\ErrorCodes.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Condition.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Event_flag.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_FileSystem.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Lwcond.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Lwmutex.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Memory.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Mutex.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Rwlock.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Spinlock.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_SPU_Thread.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Time.h" />
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Timer.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellAdec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellAtrac.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellDmux.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellFont.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellGifDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellJpgDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPamf.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPngDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellResc.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellRtc.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSpurs.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSysutil.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSysutil_SaveData.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellUserInfo.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellVdec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellVpost.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\libmixer.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sceNp.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sceNpTrophy.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sys_net.h" />
|
||||
<ClInclude Include="Emu\SysCalls\SC_FUNC.h" />
|
||||
<ClInclude Include="Emu\SysCalls\SysCalls.h" />
|
||||
<ClInclude Include="Emu\System.h" />
|
||||
<ClInclude Include="Gui\CompilerELF.h" />
|
||||
<ClInclude Include="Gui\ConLog.h" />
|
||||
<ClInclude Include="Gui\Debugger.h" />
|
||||
<ClInclude Include="Gui\DisAsmFrame.h" />
|
||||
<ClInclude Include="Gui\FrameBase.h" />
|
||||
<ClInclude Include="Gui\GameViewer.h" />
|
||||
<ClInclude Include="Gui\InterpreterDisAsm.h" />
|
||||
<ClInclude Include="Gui\MainFrame.h" />
|
||||
<ClInclude Include="Gui\MemoryViewer.h" />
|
||||
<ClInclude Include="Gui\RegisterEditor.h" />
|
||||
<ClInclude Include="Gui\RSXDebugger.h" />
|
||||
<ClInclude Include="Gui\TextInputDialog.h" />
|
||||
<ClInclude Include="Gui\VFSManager.h" />
|
||||
<ClInclude Include="Gui\VHDDManager.h" />
|
||||
<ClInclude Include="Ini.h" />
|
||||
<ClInclude Include="Loader\ELF.h" />
|
||||
<ClInclude Include="Loader\ELF32.h" />
|
||||
<ClInclude Include="Loader\ELF64.h" />
|
||||
<ClInclude Include="Loader\Loader.h" />
|
||||
<ClInclude Include="Loader\PKG.h" />
|
||||
<ClInclude Include="Loader\PSF.h" />
|
||||
<ClInclude Include="Loader\SELF.h" />
|
||||
<ClInclude Include="Loader\TROPUSR.h" />
|
||||
<ClInclude Include="Loader\TRP.h" />
|
||||
<ClInclude Include="rpcs3.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Emu">
|
||||
|
@ -26,9 +26,6 @@
|
|||
<Filter Include="Emu\GS">
|
||||
<UniqueIdentifier>{461eddb5-b8a8-46be-918c-98cc7eaf995b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Include">
|
||||
<UniqueIdentifier>{6fb03753-064a-456d-bb6f-9ceaed3776c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\GS\GL">
|
||||
<UniqueIdentifier>{e79e49c8-6967-4776-8f50-5479c3821b51}</UniqueIdentifier>
|
||||
</Filter>
|
||||
|
@ -62,6 +59,18 @@
|
|||
<Filter Include="Emu\Audio\AL">
|
||||
<UniqueIdentifier>{e9937271-a8ff-49f6-a326-c4659f96703f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\Memory">
|
||||
<UniqueIdentifier>{8e0f4d81-cb1a-4f3a-ae11-704ead4e1826}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\GS\Null">
|
||||
<UniqueIdentifier>{ee9b80ba-467b-47d0-9e20-670fec13ef5d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\Io\Null">
|
||||
<UniqueIdentifier>{16f84899-2e1c-4033-8832-f1b6abb2056b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Emu\Io\Windows">
|
||||
<UniqueIdentifier>{899523fa-c26a-44ea-b272-73c4585e3821}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="rpcs3.cpp">
|
||||
|
@ -76,9 +85,6 @@
|
|||
<ClCompile Include="Gui\ConLog.cpp">
|
||||
<Filter>Gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\Memory\Memory.cpp">
|
||||
<Filter>Emu</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Gui\MemoryViewer.cpp">
|
||||
<Filter>Gui</Filter>
|
||||
</ClCompile>
|
||||
|
@ -364,6 +370,9 @@
|
|||
<ClCompile Include="Gui\RSXDebugger.cpp">
|
||||
<Filter>Gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Gui\PADManager.cpp">
|
||||
<Filter>Gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
|
@ -490,143 +499,14 @@
|
|||
<ClCompile Include="Emu\Cell\SPURecompilerCore.cpp">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\Memory\Memory.cpp">
|
||||
<Filter>Emu\Memory</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="rpcs3.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Ini.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rpcs3.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\DbgConsole.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GameInfo.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\System.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCThread.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCThreadManager.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUDecoder.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUDisAsm.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUInterpreter.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUOpcodes.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUThread.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUDecoder.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUDisAsm.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUInterpreter.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUOpcodes.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUThread.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GCM.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GSManager.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GSRender.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLGSRender.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\Null\NullGSRender.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Pad.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\PadHandler.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Null\NullPadHandler.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Memory\Memory.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Memory\MemoryBlock.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\ErrorCodes.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\SysCalls.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\CompilerELF.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\ConLog.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\DisAsmFrame.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\FrameBase.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\GameViewer.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\InterpreterDisAsm.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\MainFrame.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\MemoryViewer.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF32.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF64.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\Loader.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\PSF.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\SELF.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\Array.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
|
@ -642,39 +522,15 @@
|
|||
<ClInclude Include="..\Utilities\Timer.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCDecoder.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCDisAsm.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCInstrTable.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUInstrTable.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUProgramCompiler.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\BEType.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\RawSPUThread.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\AudioManager.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\SMutex.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\SQueue.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\MFC.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
<Filter>Crypto</Filter>
|
||||
</ClInclude>
|
||||
|
@ -696,12 +552,429 @@
|
|||
<ClInclude Include="Crypto\unedat.h">
|
||||
<Filter>Crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPURSManager.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Utilities\StrFmt.h">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\CompilerELF.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\ConLog.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\Debugger.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\DisAsmFrame.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\GameViewer.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\InterpreterDisAsm.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\MainFrame.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\MemoryViewer.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\RSXDebugger.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\TextInputDialog.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\VFSManager.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\VHDDManager.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\PSF.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\SELF.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF32.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF64.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\ELF.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\Loader.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\PKG.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\TROPUSR.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Loader\TRP.h">
|
||||
<Filter>Loader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\AudioManager.h">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\AudioDumper.h">
|
||||
<Filter>Emu\Audio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Audio\AL\OpenALThread.h">
|
||||
<Filter>Emu\Audio\AL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\MFC.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUDecoder.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCThread.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUProgramCompiler.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\RawSPUThread.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPURSManager.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUThread.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUThread.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCDecoder.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\CPU\CPUThread.h">
|
||||
<Filter>Emu\CPU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\CPU\CPUThreadManager.h">
|
||||
<Filter>Emu\CPU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\CPU\CPUDisAsm.h">
|
||||
<Filter>Emu\CPU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\CPU\CPUInstrTable.h">
|
||||
<Filter>Emu\CPU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\CPU\CPUDecoder.h">
|
||||
<Filter>Emu\CPU</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\DbgConsole.h">
|
||||
<Filter>Emu</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Memory\Memory.h">
|
||||
<Filter>Emu\Memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Memory\MemoryBlock.h">
|
||||
<Filter>Emu\Memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\System.h">
|
||||
<Filter>Emu</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Ini.h">
|
||||
<Filter>rpcs3</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>rpcs3</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="rpcs3.h">
|
||||
<Filter>rpcs3</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\FrameBase.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Gui\RegisterEditor.h">
|
||||
<Filter>Gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GSRender.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\RSXTexture.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\RSXThread.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\RSXFragmentProgram.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\RSXVertexProgram.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GCM.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\Null\NullGSRender.h">
|
||||
<Filter>Emu\GS\Null</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GSManager.h">
|
||||
<Filter>Emu\GS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLGSRender.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLProgramBuffer.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLShaderParam.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLVertexProgram.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\OpenGL.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLBuffers.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLFragmentProgram.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GS\GL\GLProgram.h">
|
||||
<Filter>Emu\GS\GL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\GameInfo.h">
|
||||
<Filter>Emu</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Keyboard.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Mouse.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUOpcodes.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUInterpreter.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUDisAsm.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPUDecoder.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUOpcodes.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUInterpreter.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUInstrTable.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCThreadManager.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPUDisAsm.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCInstrTable.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPCDisAsm.h">
|
||||
<Filter>Emu\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Null\NullPadHandler.h">
|
||||
<Filter>Emu\Io\Null</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\PadHandler.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\KeyboardHandler.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\MouseHandler.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsMouseHandler.h">
|
||||
<Filter>Emu\Io\Windows</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsPadHandler.h">
|
||||
<Filter>Emu\Io\Windows</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Windows\WindowsKeyboardHandler.h">
|
||||
<Filter>Emu\Io\Windows</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\SysCalls.h">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\ErrorCodes.h">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AppConnector.h">
|
||||
<Filter>rpcs3</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Opcodes.h">
|
||||
<Filter>Emu\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Thread.h">
|
||||
<Filter>Emu\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7DisAsm.h">
|
||||
<Filter>Emu\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Interpreter.h">
|
||||
<Filter>Emu\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\ARMv7\ARMv7Decoder.h">
|
||||
<Filter>Emu\ARMv7</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsFileBase.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsLocalDir.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsLocalFile.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsStream.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsStreamMemory.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\VFS.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsDevice.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsDeviceLocalFile.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsDir.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsDirBase.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\FS\vfsFile.h">
|
||||
<Filter>Emu\FS</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\HDD\HDD.h">
|
||||
<Filter>Emu\HDD</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Io\Pad.h">
|
||||
<Filter>Emu\Io</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Memory.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Mutex.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Rwlock.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Spinlock.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_SPU_Thread.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Time.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Timer.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Condition.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Event_flag.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_FileSystem.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Lwcond.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\lv2\SC_Lwmutex.h">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Callback.h">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules.h">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\SC_FUNC.h">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellVdec.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellVpost.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\libmixer.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sceNp.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sceNpTrophy.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\sys_net.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellAdec.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellAtrac.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellDmux.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellFont.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellGifDec.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellJpgDec.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPamf.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPngDec.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellResc.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellRtc.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSpurs.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSysutil.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSysutil_SaveData.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellUserInfo.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\SPURecompiler.h">
|
||||
<Filter>Include</Filter>
|
||||
</ClInclude>
|
||||
|
|
Loading…
Add table
Reference in a new issue