Mouse support added

*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)
This commit is contained in:
Alexandro Sánchez Bach 2013-09-14 20:20:57 +02:00
parent 1b7302c0ba
commit 1024a7c7c4
15 changed files with 578 additions and 25 deletions

View file

@ -289,6 +289,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
wxStaticBoxSizer* s_round_io( new wxStaticBoxSizer( wxVERTICAL, &diag, _("IO") ) );
wxStaticBoxSizer* s_round_pad_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Pad Handler") ) );
wxStaticBoxSizer* s_round_keyboard_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Keyboard Handler") ) );
wxStaticBoxSizer* s_round_mouse_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Mouse Handler") ) );
wxComboBox* cbox_cpu_decoder = new wxComboBox(&diag, wxID_ANY);
wxComboBox* cbox_gs_render = new wxComboBox(&diag, wxID_ANY);
@ -296,6 +297,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
wxComboBox* cbox_gs_aspect = new wxComboBox(&diag, wxID_ANY);
wxComboBox* cbox_pad_handler = new wxComboBox(&diag, wxID_ANY);
wxComboBox* cbox_keyboard_handler = new wxComboBox(&diag, wxID_ANY);
wxComboBox* cbox_mouse_handler = new wxComboBox(&diag, wxID_ANY);
wxCheckBox* chbox_gs_vsync = new wxCheckBox(&diag, wxID_ANY, "VSync");
@ -323,6 +325,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
cbox_keyboard_handler->Append("Windows");
//cbox_pad_handler->Append("DirectInput");
cbox_mouse_handler->Append("Null");
cbox_mouse_handler->Append("Windows");
//cbox_pad_handler->Append("DirectInput");
chbox_gs_vsync->SetValue(Ini.GSVSyncEnable.GetValue());
cbox_cpu_decoder->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 0);
@ -331,6 +337,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
cbox_gs_aspect->SetSelection(Ini.GSAspectRatio.GetValue() - 1);
cbox_pad_handler->SetSelection(Ini.PadHandlerMode.GetValue());
cbox_keyboard_handler->SetSelection(Ini.KeyboardHandlerMode.GetValue());
cbox_mouse_handler->SetSelection(Ini.MouseHandlerMode.GetValue());
s_round_cpu_decoder->Add(cbox_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_cpu->Add(s_round_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
@ -345,8 +352,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
s_round_pad_handler->Add(cbox_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_keyboard_handler->Add(cbox_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_mouse_handler->Add(cbox_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_io->Add(s_round_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_io->Add(s_round_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand());
s_round_io->Add(s_round_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand());
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
@ -360,7 +369,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
s_subpanel2->Add(s_round_io, wxSizerFlags().Border(wxALL, 5).Expand());
s_subpanel1->Add(s_b_panel, wxSizerFlags().Border(wxALL, 8).Expand());
s_subpanel2->AddSpacer(200);
s_subpanel2->AddSpacer(180);
s_panel->Add(s_subpanel1, wxSizerFlags().Border(wxALL, 5).Expand());
s_panel->Add(s_subpanel2, wxSizerFlags().Border(wxALL, 5).Expand());
@ -375,6 +384,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
Ini.GSVSyncEnable.SetValue(chbox_gs_vsync->GetValue());
Ini.PadHandlerMode.SetValue(cbox_pad_handler->GetSelection());
Ini.KeyboardHandlerMode.SetValue(cbox_keyboard_handler->GetSelection());
Ini.MouseHandlerMode.SetValue(cbox_mouse_handler->GetSelection());
Ini.Save();
}