mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #716 from delroth/vertex-loader
Make vertex loader testable
This commit is contained in:
@@ -48,6 +48,11 @@ if(WIN32)
|
|||||||
set(SRCS ${SRCS} ExtendedTrace.cpp)
|
set(SRCS ${SRCS} ExtendedTrace.cpp)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
set(LIBS "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID))
|
||||||
|
set(LIBS ${LIBS} rt)
|
||||||
|
endif()
|
||||||
|
|
||||||
enable_precompiled_headers(stdafx.h stdafx.cpp SRCS)
|
enable_precompiled_headers(stdafx.h stdafx.cpp SRCS)
|
||||||
|
|
||||||
add_dolphin_library(common "${SRCS}" "${CMAKE_THREAD_LIBS_INIT}")
|
add_dolphin_library(common "${SRCS}" "${LIBS}")
|
||||||
|
|||||||
@@ -221,7 +221,18 @@ if(_M_ARM_32)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBS bdisasm inputcommon videoogl videosoftware sfml-network)
|
set(LIBS
|
||||||
|
audiocommon
|
||||||
|
bdisasm
|
||||||
|
common
|
||||||
|
discio
|
||||||
|
inputcommon
|
||||||
|
${LZO}
|
||||||
|
sfml-network
|
||||||
|
videoogl
|
||||||
|
videosoftware
|
||||||
|
z
|
||||||
|
)
|
||||||
|
|
||||||
if(LIBUSB_FOUND)
|
if(LIBUSB_FOUND)
|
||||||
# Using shared LibUSB
|
# Using shared LibUSB
|
||||||
@@ -236,6 +247,8 @@ if(WIN32)
|
|||||||
HW/WiimoteReal/IOWin.cpp)
|
HW/WiimoteReal/IOWin.cpp)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Apple.cpp HW/WiimoteReal/IOdarwin.mm)
|
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Apple.cpp HW/WiimoteReal/IOdarwin.mm)
|
||||||
|
set(LIBS ${LIBS}
|
||||||
|
${IOB_LIBRARY})
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Unix.cpp)
|
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Unix.cpp)
|
||||||
if((${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND BLUEZ_FOUND)
|
if((${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND BLUEZ_FOUND)
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ void Host_UpdateLogDisplay();
|
|||||||
void Host_UpdateMainFrame();
|
void Host_UpdateMainFrame();
|
||||||
void Host_UpdateStatusBar(const std::string& text, int Filed = 0);
|
void Host_UpdateStatusBar(const std::string& text, int Filed = 0);
|
||||||
void Host_UpdateTitle(const std::string& title);
|
void Host_UpdateTitle(const std::string& title);
|
||||||
|
void Host_ShowVideoConfig(void* parent, const std::string& backend_name,
|
||||||
|
const std::string& config_name);
|
||||||
|
|
||||||
// TODO (neobrain): Remove this from host!
|
// TODO (neobrain): Remove this from host!
|
||||||
void* Host_GetRenderHandle();
|
void* Host_GetRenderHandle();
|
||||||
|
|||||||
@@ -4,41 +4,17 @@ endif()
|
|||||||
|
|
||||||
set(LIBS core
|
set(LIBS core
|
||||||
${LZO}
|
${LZO}
|
||||||
discio
|
|
||||||
bdisasm
|
|
||||||
inputcommon
|
|
||||||
common
|
|
||||||
audiocommon
|
|
||||||
z
|
|
||||||
sfml-network
|
|
||||||
${GTK2_LIBRARIES})
|
${GTK2_LIBRARIES})
|
||||||
|
|
||||||
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID))
|
|
||||||
set(LIBS ${LIBS} rt)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ANDROID)
|
if(NOT ANDROID)
|
||||||
if(USE_X11)
|
if(USE_X11)
|
||||||
set(LIBS ${LIBS} ${X11_LIBRARIES}
|
set(LIBS ${LIBS} ${XRANDR_LIBRARIES})
|
||||||
${XINPUT2_LIBRARIES}
|
|
||||||
${XRANDR_LIBRARIES})
|
|
||||||
endif()
|
endif()
|
||||||
if(USE_WAYLAND)
|
if(USE_WAYLAND)
|
||||||
set(LIBS ${LIBS} ${WAYLAND_LIBRARIES}
|
set(LIBS ${LIBS} ${WAYLAND_LIBRARIES} ${XKBCOMMON_LIBRARIES})
|
||||||
${XKBCOMMON_LIBRARIES})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
link_directories(${CMAKE_PREFIX_PATH}/lib)
|
link_directories(${CMAKE_PREFIX_PATH}/lib)
|
||||||
|
|
||||||
if(SDL2_FOUND)
|
|
||||||
# Using shared SDL2
|
|
||||||
set(LIBS ${LIBS} ${SDL2_LIBRARY})
|
|
||||||
else(SDL2_FOUND)
|
|
||||||
if(SDL_FOUND)
|
|
||||||
# Using shared SDL
|
|
||||||
set(LIBS ${LIBS} ${SDL_LIBRARY})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(LIBS ${LIBS} png iconv)
|
set(LIBS ${LIBS} png iconv)
|
||||||
endif()
|
endif()
|
||||||
@@ -87,6 +63,7 @@ if(wxWidgets_FOUND)
|
|||||||
MemoryCards/WiiSaveCrypted.cpp
|
MemoryCards/WiiSaveCrypted.cpp
|
||||||
NetWindow.cpp
|
NetWindow.cpp
|
||||||
PatchAddEdit.cpp
|
PatchAddEdit.cpp
|
||||||
|
SoftwareVideoConfigDialog.cpp
|
||||||
TASInputDlg.cpp
|
TASInputDlg.cpp
|
||||||
VideoConfigDiag.cpp
|
VideoConfigDiag.cpp
|
||||||
WXInputBase.cpp
|
WXInputBase.cpp
|
||||||
@@ -123,6 +100,7 @@ else()
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
set(SRCS ${SRCS} GLInterface/GLInterface.cpp)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(SRCS ${SRCS} stdafx.cpp)
|
set(SRCS ${SRCS} stdafx.cpp)
|
||||||
@@ -134,7 +112,6 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||||||
${COREAUDIO_LIBRARY}
|
${COREAUDIO_LIBRARY}
|
||||||
${COREFUND_LIBRARY}
|
${COREFUND_LIBRARY}
|
||||||
${CORESERV_LIBRARY}
|
${CORESERV_LIBRARY}
|
||||||
${IOB_LIBRARY}
|
|
||||||
${IOK_LIBRARY}
|
${IOK_LIBRARY}
|
||||||
${FORCEFEEDBACK}
|
${FORCEFEEDBACK}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
<ClCompile Include="FrameTools.cpp" />
|
<ClCompile Include="FrameTools.cpp" />
|
||||||
<ClCompile Include="GameListCtrl.cpp" />
|
<ClCompile Include="GameListCtrl.cpp" />
|
||||||
<ClCompile Include="GeckoCodeDiag.cpp" />
|
<ClCompile Include="GeckoCodeDiag.cpp" />
|
||||||
|
<ClCompile Include="GLInterface\GLInterface.cpp" />
|
||||||
<ClCompile Include="GLInterface\WGL.cpp" />
|
<ClCompile Include="GLInterface\WGL.cpp" />
|
||||||
<ClCompile Include="HotkeyDlg.cpp" />
|
<ClCompile Include="HotkeyDlg.cpp" />
|
||||||
<ClCompile Include="InputConfigDiag.cpp" />
|
<ClCompile Include="InputConfigDiag.cpp" />
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
<ClCompile Include="MemoryCards\WiiSaveCrypted.cpp" />
|
<ClCompile Include="MemoryCards\WiiSaveCrypted.cpp" />
|
||||||
<ClCompile Include="NetWindow.cpp" />
|
<ClCompile Include="NetWindow.cpp" />
|
||||||
<ClCompile Include="PatchAddEdit.cpp" />
|
<ClCompile Include="PatchAddEdit.cpp" />
|
||||||
|
<ClCompile Include="SoftwareVideoConfigDialog.cpp" />
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -125,7 +127,6 @@
|
|||||||
<ClInclude Include="Frame.h" />
|
<ClInclude Include="Frame.h" />
|
||||||
<ClInclude Include="GameListCtrl.h" />
|
<ClInclude Include="GameListCtrl.h" />
|
||||||
<ClInclude Include="GeckoCodeDiag.h" />
|
<ClInclude Include="GeckoCodeDiag.h" />
|
||||||
<ClInclude Include="GLInterface\InterfaceBase.h" />
|
|
||||||
<ClInclude Include="GLInterface\WGL.h" />
|
<ClInclude Include="GLInterface\WGL.h" />
|
||||||
<ClInclude Include="Globals.h" />
|
<ClInclude Include="Globals.h" />
|
||||||
<ClInclude Include="HotkeyDlg.h" />
|
<ClInclude Include="HotkeyDlg.h" />
|
||||||
@@ -139,6 +140,7 @@
|
|||||||
<ClInclude Include="MemoryCards\WiiSaveCrypted.h" />
|
<ClInclude Include="MemoryCards\WiiSaveCrypted.h" />
|
||||||
<ClInclude Include="NetWindow.h" />
|
<ClInclude Include="NetWindow.h" />
|
||||||
<ClInclude Include="PatchAddEdit.h" />
|
<ClInclude Include="PatchAddEdit.h" />
|
||||||
|
<ClInclude Include="SoftwareVideoConfigDialog.h" />
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="TASInputDlg.h" />
|
<ClInclude Include="TASInputDlg.h" />
|
||||||
<ClInclude Include="VideoConfigDiag.h" />
|
<ClInclude Include="VideoConfigDiag.h" />
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="GLInterface\GLInterface.cpp" />
|
||||||
<ClCompile Include="GLInterface\WGL.cpp" />
|
<ClCompile Include="GLInterface\WGL.cpp" />
|
||||||
<ClCompile Include="Main.cpp" />
|
<ClCompile Include="Main.cpp" />
|
||||||
<ClCompile Include="MainNoGUI.cpp" />
|
<ClCompile Include="MainNoGUI.cpp" />
|
||||||
@@ -153,9 +154,11 @@
|
|||||||
<Filter>GUI</Filter>
|
<Filter>GUI</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="stdafx.cpp" />
|
<ClCompile Include="stdafx.cpp" />
|
||||||
|
<ClCompile Include="SoftwareVideoConfigDialog.cpp">
|
||||||
|
<Filter>GUI\Video</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="GLInterface\InterfaceBase.h" />
|
|
||||||
<ClInclude Include="GLInterface\WGL.h" />
|
<ClInclude Include="GLInterface\WGL.h" />
|
||||||
<ClInclude Include="Main.h" />
|
<ClInclude Include="Main.h" />
|
||||||
<ClInclude Include="WXInputBase.h" />
|
<ClInclude Include="WXInputBase.h" />
|
||||||
@@ -276,6 +279,9 @@
|
|||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="GLInterface\GLInterface.h" />
|
<ClInclude Include="GLInterface\GLInterface.h" />
|
||||||
|
<ClInclude Include="SoftwareVideoConfigDialog.h">
|
||||||
|
<Filter>GUI\Video</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "DolphinWX/GLInterface/InterfaceBase.h"
|
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||||
|
|
||||||
class cInterfaceAGL : public cInterfaceBase
|
class cInterfaceAGL : public cInterfaceBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "DolphinWX/GLInterface/InterfaceBase.h"
|
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||||
|
|
||||||
|
|
||||||
class cPlatform
|
class cPlatform
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
// Copyright 2014 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "DolphinWX/GLInterface/GLInterface.h"
|
||||||
|
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||||
|
|
||||||
|
GLWindow GLWin;
|
||||||
|
|
||||||
|
cInterfaceBase* HostGL_CreateGLInterface()
|
||||||
|
{
|
||||||
|
#if defined(USE_EGL) && USE_EGL
|
||||||
|
return new cInterfaceEGL;
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
return new cInterfaceAGL;
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
return new cInterfaceWGL;
|
||||||
|
#elif defined(HAVE_X11) && HAVE_X11
|
||||||
|
return new cInterfaceGLX;
|
||||||
|
#else
|
||||||
|
return nullptr;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
@@ -108,5 +108,4 @@ typedef struct {
|
|||||||
unsigned int width, height;
|
unsigned int width, height;
|
||||||
} GLWindow;
|
} GLWindow;
|
||||||
|
|
||||||
extern cInterfaceBase *GLInterface;
|
|
||||||
extern GLWindow GLWin;
|
extern GLWindow GLWin;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "DolphinWX/GLInterface/InterfaceBase.h"
|
|
||||||
#include "DolphinWX/GLInterface/X11_Util.h"
|
#include "DolphinWX/GLInterface/X11_Util.h"
|
||||||
|
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||||
|
|
||||||
class cInterfaceGLX : public cInterfaceBase
|
class cInterfaceGLX : public cInterfaceBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "DolphinWX/GLInterface/InterfaceBase.h"
|
#include "VideoBackends/OGL/GLInterfaceBase.h"
|
||||||
|
|
||||||
class cInterfaceWGL : public cInterfaceBase
|
class cInterfaceWGL : public cInterfaceBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
#include "DolphinWX/Frame.h"
|
#include "DolphinWX/Frame.h"
|
||||||
#include "DolphinWX/Globals.h"
|
#include "DolphinWX/Globals.h"
|
||||||
#include "DolphinWX/Main.h"
|
#include "DolphinWX/Main.h"
|
||||||
|
#include "DolphinWX/SoftwareVideoConfigDialog.h"
|
||||||
|
#include "DolphinWX/VideoConfigDiag.h"
|
||||||
#include "DolphinWX/WxUtils.h"
|
#include "DolphinWX/WxUtils.h"
|
||||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||||
#include "DolphinWX/Debugger/JitWindow.h"
|
#include "DolphinWX/Debugger/JitWindow.h"
|
||||||
@@ -686,3 +688,18 @@ void Host_ConnectWiimote(int wm_idx, bool connect)
|
|||||||
{
|
{
|
||||||
CFrame::ConnectWiimote(wm_idx, connect);
|
CFrame::ConnectWiimote(wm_idx, connect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Host_ShowVideoConfig(void* parent, const std::string& backend_name,
|
||||||
|
const std::string& config_name)
|
||||||
|
{
|
||||||
|
if (backend_name == "Direct3D" || backend_name == "OpenGL")
|
||||||
|
{
|
||||||
|
VideoConfigDiag diag((wxWindow*)parent, backend_name, config_name);
|
||||||
|
diag.ShowModal();
|
||||||
|
}
|
||||||
|
else if (backend_name == "Software Renderer")
|
||||||
|
{
|
||||||
|
SoftwareVideoConfigDialog diag((wxWindow*)parent, backend_name, config_name);
|
||||||
|
diag.ShowModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ void Host_SysMessage(const char *fmt, ...)
|
|||||||
|
|
||||||
void Host_SetWiiMoteConnectionState(int _State) {}
|
void Host_SetWiiMoteConnectionState(int _State) {}
|
||||||
|
|
||||||
|
void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {}
|
||||||
|
|
||||||
#define DVD_BANNER_WIDTH 96
|
#define DVD_BANNER_WIDTH 96
|
||||||
#define DVD_BANNER_HEIGHT 32
|
#define DVD_BANNER_HEIGHT 32
|
||||||
std::vector<std::string> m_volume_names;
|
std::vector<std::string> m_volume_names;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreParameter.h"
|
#include "Core/CoreParameter.h"
|
||||||
|
#include "Core/Host.h"
|
||||||
#include "Core/HW/Wiimote.h"
|
#include "Core/HW/Wiimote.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
|
||||||
@@ -133,6 +134,8 @@ void Host_SysMessage(const char *fmt, ...)
|
|||||||
|
|
||||||
void Host_SetWiiMoteConnectionState(int _State) {}
|
void Host_SetWiiMoteConnectionState(int _State) {}
|
||||||
|
|
||||||
|
void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {}
|
||||||
|
|
||||||
#if HAVE_X11
|
#if HAVE_X11
|
||||||
void X11_MainLoop()
|
void X11_MainLoop()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,144 @@
|
|||||||
|
// Copyright 2013 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/combobox.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/wx.h>
|
||||||
|
|
||||||
|
#include "Common/FileUtil.h"
|
||||||
|
#include "Core/Core.h"
|
||||||
|
#include "DolphinWX/SoftwareVideoConfigDialog.h"
|
||||||
|
#include "DolphinWX/VideoConfigDiag.h"
|
||||||
|
#include "DolphinWX/WxUtils.h"
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
IntegerSetting<T>::IntegerSetting(wxWindow* parent, const wxString& label, T& setting, int minVal, int maxVal, long style) :
|
||||||
|
wxSpinCtrl(parent, -1, label, wxDefaultPosition, wxDefaultSize, style),
|
||||||
|
m_setting(setting)
|
||||||
|
{
|
||||||
|
SetRange(minVal, maxVal);
|
||||||
|
SetValue(m_setting);
|
||||||
|
Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, &IntegerSetting::UpdateValue, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std::string& title, const std::string& _ininame) :
|
||||||
|
wxDialog(parent, -1,
|
||||||
|
wxString(wxString::Format(_("Dolphin %s Graphics Configuration"), title))),
|
||||||
|
vconfig(g_SWVideoConfig),
|
||||||
|
ininame(_ininame)
|
||||||
|
{
|
||||||
|
vconfig.Load((File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini").c_str());
|
||||||
|
|
||||||
|
wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
|
// -- GENERAL --
|
||||||
|
{
|
||||||
|
wxPanel* const page_general= new wxPanel(notebook, -1, wxDefaultPosition);
|
||||||
|
notebook->AddPage(page_general, wxT("General"));
|
||||||
|
wxBoxSizer* const szr_general = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
// - rendering
|
||||||
|
{
|
||||||
|
wxStaticBoxSizer* const group_rendering = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Rendering"));
|
||||||
|
szr_general->Add(group_rendering, 0, wxEXPAND | wxALL, 5);
|
||||||
|
wxGridSizer* const szr_rendering = new wxGridSizer(2, 5, 5);
|
||||||
|
group_rendering->Add(szr_rendering, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
// backend
|
||||||
|
wxStaticText* const label_backend = new wxStaticText(page_general, wxID_ANY, _("Backend:"));
|
||||||
|
wxChoice* const choice_backend = new wxChoice(page_general, wxID_ANY, wxDefaultPosition);
|
||||||
|
|
||||||
|
for (const VideoBackend* backend : g_available_video_backends)
|
||||||
|
{
|
||||||
|
choice_backend->AppendString(StrToWxStr(backend->GetDisplayName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: How to get the translated plugin name?
|
||||||
|
choice_backend->SetStringSelection(StrToWxStr(g_video_backend->GetName()));
|
||||||
|
choice_backend->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &SoftwareVideoConfigDialog::Event_Backend, this);
|
||||||
|
|
||||||
|
szr_rendering->Add(label_backend, 1, wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
szr_rendering->Add(choice_backend, 1, 0, 0);
|
||||||
|
|
||||||
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
|
{
|
||||||
|
label_backend->Disable();
|
||||||
|
choice_backend->Disable();
|
||||||
|
}
|
||||||
|
|
||||||
|
// rasterizer
|
||||||
|
szr_rendering->Add(new SettingCheckBox(page_general, wxT("Hardware rasterization"), wxT(""), vconfig.bHwRasterizer));
|
||||||
|
|
||||||
|
// xfb
|
||||||
|
szr_rendering->Add(new SettingCheckBox(page_general, wxT("Bypass XFB"), wxT(""), vconfig.bBypassXFB));
|
||||||
|
}
|
||||||
|
|
||||||
|
// - info
|
||||||
|
{
|
||||||
|
wxStaticBoxSizer* const group_info = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Overlay Information"));
|
||||||
|
szr_general->Add(group_info, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
wxGridSizer* const szr_info = new wxGridSizer(2, 5, 5);
|
||||||
|
group_info->Add(szr_info, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
szr_info->Add(new SettingCheckBox(page_general, wxT("Various Statistics"), wxT(""), vconfig.bShowStats));
|
||||||
|
}
|
||||||
|
|
||||||
|
// - utility
|
||||||
|
{
|
||||||
|
wxStaticBoxSizer* const group_utility = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Utility"));
|
||||||
|
szr_general->Add(group_utility, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
wxGridSizer* const szr_utility = new wxGridSizer(2, 5, 5);
|
||||||
|
group_utility->Add(szr_utility, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
szr_utility->Add(new SettingCheckBox(page_general, wxT("Dump Textures"), wxT(""), vconfig.bDumpTextures));
|
||||||
|
szr_utility->Add(new SettingCheckBox(page_general, wxT("Dump Objects"), wxT(""), vconfig.bDumpObjects));
|
||||||
|
szr_utility->Add(new SettingCheckBox(page_general, wxT("Dump Frames"), wxT(""), vconfig.bDumpFrames));
|
||||||
|
|
||||||
|
// - debug only
|
||||||
|
wxStaticBoxSizer* const group_debug_only_utility = new wxStaticBoxSizer(wxHORIZONTAL, page_general, wxT("Debug Only"));
|
||||||
|
group_utility->Add(group_debug_only_utility, 0, wxEXPAND | wxBOTTOM, 5);
|
||||||
|
wxGridSizer* const szr_debug_only_utility = new wxGridSizer(2, 5, 5);
|
||||||
|
group_debug_only_utility->Add(szr_debug_only_utility, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
szr_debug_only_utility->Add(new SettingCheckBox(page_general, wxT("Dump TEV Stages"), wxT(""), vconfig.bDumpTevStages));
|
||||||
|
szr_debug_only_utility->Add(new SettingCheckBox(page_general, wxT("Dump Texture Fetches"), wxT(""), vconfig.bDumpTevTextureFetches));
|
||||||
|
}
|
||||||
|
|
||||||
|
// - misc
|
||||||
|
{
|
||||||
|
wxStaticBoxSizer* const group_misc = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Drawn Object Range"));
|
||||||
|
szr_general->Add(group_misc, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
wxFlexGridSizer* const szr_misc = new wxFlexGridSizer(2, 5, 5);
|
||||||
|
group_misc->Add(szr_misc, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
szr_misc->Add(new U32Setting(page_general, wxT("Start"), vconfig.drawStart, 0, 100000));
|
||||||
|
szr_misc->Add(new U32Setting(page_general, wxT("End"), vconfig.drawEnd, 0, 100000));
|
||||||
|
}
|
||||||
|
|
||||||
|
page_general->SetSizerAndFit(szr_general);
|
||||||
|
}
|
||||||
|
|
||||||
|
wxBoxSizer* const szr_main = new wxBoxSizer(wxVERTICAL);
|
||||||
|
szr_main->Add(notebook, 1, wxEXPAND | wxALL, 5);
|
||||||
|
szr_main->Add(new wxButton(this, wxID_OK, wxT("Close"), wxDefaultPosition),
|
||||||
|
0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
||||||
|
SetSizerAndFit(szr_main);
|
||||||
|
Center();
|
||||||
|
SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
SoftwareVideoConfigDialog::~SoftwareVideoConfigDialog()
|
||||||
|
{
|
||||||
|
g_SWVideoConfig.Save((File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini").c_str());
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
// Copyright 2013 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
// TODO: Merge this with the original VideoConfigDiag or something
|
||||||
|
// This is an awful way of managing a separate video backend.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/combobox.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/wx.h>
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
|
#include "VideoBackends/Software/SWVideoConfig.h"
|
||||||
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
|
||||||
|
class SoftwareVideoConfigDialog : public wxDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SoftwareVideoConfigDialog(wxWindow* parent, const std::string &title, const std::string& ininame);
|
||||||
|
~SoftwareVideoConfigDialog();
|
||||||
|
|
||||||
|
void Event_Backend(wxCommandEvent &ev)
|
||||||
|
{
|
||||||
|
VideoBackend* new_backend = g_available_video_backends[ev.GetInt()];
|
||||||
|
|
||||||
|
if (g_video_backend != new_backend)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
|
||||||
|
g_video_backend = new_backend;
|
||||||
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
|
||||||
|
|
||||||
|
g_video_backend->ShowConfig(GetParent());
|
||||||
|
}
|
||||||
|
ev.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
SWVideoConfig& vconfig;
|
||||||
|
std::string ininame;
|
||||||
|
};
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#include "DolphinWX/Main.h"
|
#include "DolphinWX/Main.h"
|
||||||
#include "DolphinWX/VideoConfigDiag.h"
|
#include "DolphinWX/VideoConfigDiag.h"
|
||||||
#include "DolphinWX/WxUtils.h"
|
#include "DolphinWX/WxUtils.h"
|
||||||
|
#include "VideoBackends/OGL/main.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ set(SRCS ControllerEmu.cpp
|
|||||||
ControllerInterface/Device.cpp
|
ControllerInterface/Device.cpp
|
||||||
ControllerInterface/ExpressionParser.cpp)
|
ControllerInterface/ExpressionParser.cpp)
|
||||||
|
|
||||||
|
|
||||||
|
set(LIBS common)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(SRCS ${SRCS}
|
set(SRCS ${SRCS}
|
||||||
ControllerInterface/DInput/DInput.cpp
|
ControllerInterface/DInput/DInput.cpp
|
||||||
@@ -24,6 +27,7 @@ elseif(X11_FOUND)
|
|||||||
set(SRCS ${SRCS}
|
set(SRCS ${SRCS}
|
||||||
ControllerInterface/Xlib/XInput2.cpp)
|
ControllerInterface/Xlib/XInput2.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
set(LIBS ${LIBS} ${X11_LIBRARIES} ${XINPUT2_LIBRARIES})
|
||||||
elseif(ANDROID)
|
elseif(ANDROID)
|
||||||
set(SRCS ${SRCS}
|
set(SRCS ${SRCS}
|
||||||
ControllerInterface/Android/Android.cpp)
|
ControllerInterface/Android/Android.cpp)
|
||||||
@@ -31,6 +35,11 @@ endif()
|
|||||||
|
|
||||||
if(SDL_FOUND OR SDL2_FOUND)
|
if(SDL_FOUND OR SDL2_FOUND)
|
||||||
set(SRCS ${SRCS} ControllerInterface/SDL/SDL.cpp)
|
set(SRCS ${SRCS} ControllerInterface/SDL/SDL.cpp)
|
||||||
|
if (SDL2_FOUND)
|
||||||
|
set(LIBS ${LIBS} ${SDL2_LIBRARY})
|
||||||
|
elseif(SDL_FOUND)
|
||||||
|
set(LIBS ${LIBS} ${SDL_LIBRARY})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_dolphin_library(inputcommon "${SRCS}" "")
|
add_dolphin_library(inputcommon "${SRCS}" "${LIBS}")
|
||||||
|
|||||||
@@ -5,10 +5,6 @@
|
|||||||
#include "Common/Thread.h"
|
#include "Common/Thread.h"
|
||||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||||
|
|
||||||
#if USE_EGL
|
|
||||||
#include "DolphinWX/GLInterface/GLInterface.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CIFACE_USE_XINPUT
|
#ifdef CIFACE_USE_XINPUT
|
||||||
#include "InputCommon/ControllerInterface/XInput/XInput.h"
|
#include "InputCommon/ControllerInterface/XInput/XInput.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -57,16 +53,10 @@ void ControllerInterface::Initialize()
|
|||||||
ciface::XInput::Init(m_devices);
|
ciface::XInput::Init(m_devices);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CIFACE_USE_XLIB
|
#ifdef CIFACE_USE_XLIB
|
||||||
#if USE_EGL
|
|
||||||
if (GLWin.platform == EGL_PLATFORM_X11) {
|
|
||||||
#endif
|
|
||||||
ciface::Xlib::Init(m_devices, m_hwnd);
|
ciface::Xlib::Init(m_devices, m_hwnd);
|
||||||
#ifdef CIFACE_USE_X11_XINPUT2
|
#ifdef CIFACE_USE_X11_XINPUT2
|
||||||
ciface::XInput2::Init(m_devices, m_hwnd);
|
ciface::XInput2::Init(m_devices, m_hwnd);
|
||||||
#endif
|
#endif
|
||||||
#if USE_EGL
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef CIFACE_USE_OSX
|
#ifdef CIFACE_USE_OSX
|
||||||
ciface::OSX::Init(m_devices, m_hwnd);
|
ciface::OSX::Init(m_devices, m_hwnd);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user