mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
*Implemented 'cellMouse*' functions from 'sys_io' module, which are part of the libmouse library. * Added corresponding entries in the 'Config > Settings' menu to change the handler of the mouse. Supported handlers: Windows, Null. * cellGifDec: Fixed some errors and added support for RGBA color. (Remember: The mouse support is very experimental)
38 lines
No EOL
665 B
C++
38 lines
No EOL
665 B
C++
#include "stdafx.h"
|
|
#include "Mouse.h"
|
|
#include "Null/NullMouseHandler.h"
|
|
#include "Windows/WindowsMouseHandler.h"
|
|
|
|
MouseManager::MouseManager()
|
|
: m_mouse_handler(nullptr)
|
|
, m_inited(false)
|
|
{
|
|
}
|
|
|
|
MouseManager::~MouseManager()
|
|
{
|
|
}
|
|
|
|
void MouseManager::Init(const u32 max_connect)
|
|
{
|
|
if(m_inited) return;
|
|
|
|
switch(Ini.MouseHandlerMode.GetValue())
|
|
{
|
|
case 1: m_mouse_handler = new WindowsMouseHandler(); break;
|
|
|
|
default:
|
|
case 0: m_mouse_handler = new NullMouseHandler(); break;
|
|
}
|
|
|
|
m_mouse_handler->Init(max_connect);
|
|
m_inited = true;
|
|
}
|
|
|
|
void MouseManager::Close()
|
|
{
|
|
if(m_mouse_handler) m_mouse_handler->Close();
|
|
m_mouse_handler = nullptr;
|
|
|
|
m_inited = false;
|
|
} |