Skip to content

Commit

Permalink
Revert "Enable LLE USB + add SDL submodule"
Browse files Browse the repository at this point in the history
This reverts commit 2daca74.
  • Loading branch information
ergo720 committed Jan 12, 2019
1 parent a166387 commit 27f2316
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@
[submodule "import/simpleini"]
path = import/simpleini
url = https://github.com/brofield/simpleini
[submodule "import\\SDL2"]
path = import\\SDL2
url = https://github.com/spurious/SDL-mirror
branch = release-2.0.9
13 changes: 0 additions & 13 deletions build/win32/Cxbx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbx", "Cxbx.vcxproj", "{E7A72D3D-5810-4078-A243-348B59726365}"
ProjectSection(ProjectDependencies) = postProject
{EFA81330-D410-4232-9A0C-1D8B91B6FFFF} = {EFA81330-D410-4232-9A0C-1D8B91B6FFFF}
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
{B8D9AFC2-B38F-4714-846D-8A2754F076C9} = {B8D9AFC2-B38F-4714-846D-8A2754F076C9}
{2171C0E8-4915-49B9-AC23-A484FA08C126} = {2171C0E8-4915-49B9-AC23-A484FA08C126}
EndProjectSection
Expand All @@ -27,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XbSymbolDatabase", "..\..\i
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxbxVSBC", "CxbxVSBC.vcxproj", "{EFA81330-D410-4232-9A0C-1D8B91B6FFFF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "..\..\import\SDL2\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -103,16 +100,6 @@ Global
{EFA81330-D410-4232-9A0C-1D8B91B6FFFF}.Release|Win32.Build.0 = Release|Win32
{EFA81330-D410-4232-9A0C-1D8B91B6FFFF}.Release|x64.ActiveCfg = Release|x64
{EFA81330-D410-4232-9A0C-1D8B91B6FFFF}.Release|x64.Build.0 = Release|x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Any CPU.ActiveCfg = Debug|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Any CPU.ActiveCfg = Release|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 4 additions & 4 deletions build/win32/Cxbx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\import\DirectX8\include;..\..\import\SDL2\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\import\DirectX8\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\import\DirectX8\lib;$(LibraryPath)</LibraryPath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\import\DirectX8\include;..\..\import\SDL2\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\import\DirectX8\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\import\DirectX8\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down Expand Up @@ -95,7 +95,7 @@
<AdditionalIncludeDirectories>Include\Win32\Cxbx;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>legacy_stdio_definitions.lib;d3d9.lib;dinput8.lib;dxguid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;dxerr9.lib;ws2_32.lib;dsound.lib;winmm.lib;ddraw.lib;d3dx9.lib;dbghelp.lib;comctl32.lib;XINPUT9_1_0.LIB;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>legacy_stdio_definitions.lib;d3d9.lib;dinput8.lib;dxguid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;dxerr9.lib;ws2_32.lib;dsound.lib;winmm.lib;ddraw.lib;d3dx9.lib;dbghelp.lib;comctl32.lib;XINPUT9_1_0.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(Configuration)\;..\..\import\distorm\lib\Win32\;..\..\import\glew-2.0.0\lib\Release\Win32\;..\..\import\DirectX9\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libcmt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
Expand Down Expand Up @@ -165,7 +165,7 @@
<AdditionalIncludeDirectories>Include\Win32\Cxbx;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>legacy_stdio_definitions.lib;d3d9.lib;dinput8.lib;dxguid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;dxerr9.lib;ws2_32.lib;dsound.lib;winmm.lib;ddraw.lib;d3dx9.lib;dbghelp.lib;comctl32.lib;XINPUT9_1_0.LIB;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>legacy_stdio_definitions.lib;d3d9.lib;dinput8.lib;dxguid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;dxerr9.lib;ws2_32.lib;dsound.lib;winmm.lib;ddraw.lib;d3dx9.lib;dbghelp.lib;comctl32.lib;XINPUT9_1_0.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(Configuration)\;..\..\import\distorm\lib\Win32\;..\..\import\glew-2.0.0\lib\Release\Win32\;..\..\import\DirectX9\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libcmt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
Expand Down
1 change: 0 additions & 1 deletion import/SDL2
Submodule SDL2 deleted from 8a812a
1 change: 0 additions & 1 deletion resource/Cxbx.rc
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ BEGIN
POPUP "&LLE (Experimental)", 65535,MFT_STRING,MFS_ENABLED
BEGIN
MENUITEM "LLE &GPU", ID_EMULATION_LLE_GPU,MFT_STRING,MFS_ENABLED
MENUITEM "LLE &USB", ID_EMULATION_LLE_USB,MFT_STRING,MFS_ENABLED
END
POPUP "Hacks", 65535,MFT_STRING,MFS_ENABLED
BEGIN
Expand Down
2 changes: 1 addition & 1 deletion src/common/input/InputConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// * All rights reserved
// *
// ******************************************************************
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
#define _XBOXKRNL_DEFEXTRN_
#define LOG_PREFIX CXBXR_MODULE::SDL2

Expand Down
2 changes: 1 addition & 1 deletion src/common/input/InputConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#ifndef INPUTCONFIG_H_
#define INPUTCONFIG_H_
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
#include <vector>
#include <atomic>
#include "SDL.h"
Expand Down
2 changes: 1 addition & 1 deletion src/common/input/SDL2_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// *
// ******************************************************************

#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
#include "SDL2_Device.h"
#include <assert.h>

Expand Down
2 changes: 1 addition & 1 deletion src/common/input/SDL2_Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#ifndef SDL2DEVICE_H_
#define SDL2DEVICE_H_
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
#include "InputConfig.h"


Expand Down
2 changes: 1 addition & 1 deletion src/core/hle/Intercept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void EmuUpdateLLEStatus(uint32_t XbLibScan)
FlagsLLE ^= LLE_APU;
EmuOutputMessage(XB_OUTPUT_MESSAGE_INFO, "Fallback to LLE APU.");
}
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
if ((FlagsLLE & LLE_USB) == false
&& (XbLibScan & XbSymbolLib_XAPILIB) == 0) {
bLLE_USB = true;
Expand Down
4 changes: 2 additions & 2 deletions src/core/kernel/init/CxbxKrnl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ __declspec(noreturn) void CxbxKrnlInit
g_EmuShared->GetFlagsLLE(&CxbxLLE_Flags);
bLLE_APU = (CxbxLLE_Flags & LLE_APU) > 0;
bLLE_GPU = (CxbxLLE_Flags & LLE_GPU) > 0;
bLLE_USB = (CxbxLLE_Flags & LLE_USB) > 0; // Reenable this when LLE USB actually works
//bLLE_USB = (CxbxLLE_Flags & LLE_USB) > 0; // Reenable this when LLE USB actually works
bLLE_JIT = (CxbxLLE_Flags & LLE_JIT) > 0;
}

Expand Down Expand Up @@ -1580,7 +1580,7 @@ __declspec(noreturn) void CxbxKrnlInit
xboxkrnl::HalReadSMBusValue(SMBUS_ADDRESS_SYSTEM_MICRO_CONTROLLER, SMC_COMMAND_AV_PACK, FALSE, &xboxkrnl::HalBootSMCVideoMode);

if (bLLE_USB) {
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
int ret;
g_InputDeviceManager = new InputDeviceManager;
ret = g_InputDeviceManager->EnumSdl2Devices();
Expand Down
6 changes: 3 additions & 3 deletions src/devices/usb/XidGamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void XidGamepad::UsbXid_HandleControl(XboxDeviceState* dev, USBPacket* p,
// If the buffer has the correct length the full input data is transferred."
if (value == 0x0100) {
if (length <= m_XidState->in_state.bLength) {
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
SDL2Devices* controller = g_InputDeviceManager->FindDeviceFromXboxPort(m_Port);
if (controller != nullptr) {
controller->ReadButtonState(&m_XidState->in_state.wButtons, m_XidState->in_state.bAnalogButtons,
Expand Down Expand Up @@ -484,7 +484,7 @@ void XidGamepad::UsbXid_HandleData(XboxDeviceState* dev, USBPacket* p)
switch (p->Pid) {
case USB_TOKEN_IN: {
if (p->Endpoint->Num == 2) {
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
SDL2Devices* controller = g_InputDeviceManager->FindDeviceFromXboxPort(m_Port);
if (controller != nullptr) {
bool ret;
Expand All @@ -498,7 +498,7 @@ void XidGamepad::UsbXid_HandleData(XboxDeviceState* dev, USBPacket* p)
#endif
p->Status = USB_RET_NAK;
}
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
}
else {
p->Status = USB_RET_STALL;
Expand Down
1 change: 0 additions & 1 deletion src/gui/ResCxbx.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
#define ID_EMULATION_LLE_APU 40039
#define ID_EMULATION_LLE_GPU 40040
#define ID_EMULATION_LLE_JIT 40041
#define ID_EMULATION_LLE_USB 40042
#define ID_SETTINGS_CONFIG_CONTROLLER 40046
#define ID_SETTINGS_CONFIG_VIDEO 40047
#define ID_SETTINGS_CONFIG_AUDIO 40048
Expand Down
6 changes: 3 additions & 3 deletions src/gui/WndMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
RefreshMenus();
}
break;
#if 1 // Reenable this when LLE USB actually works
#if 0 // Reenable this when LLE USB actually works
case ID_EMULATION_LLE_USB:
{
g_Settings->m_core.FlagsLLE = g_Settings->m_core.FlagsLLE ^ LLE_USB;
Expand Down Expand Up @@ -1710,8 +1710,8 @@ void WndMain::RefreshMenus()
chk_flag = (g_Settings->m_core.FlagsLLE & LLE_GPU) ? MF_CHECKED : MF_UNCHECKED;
CheckMenuItem(settings_menu, ID_EMULATION_LLE_GPU, chk_flag);

chk_flag = (g_Settings->m_core.FlagsLLE & LLE_USB) ? MF_CHECKED : MF_UNCHECKED; // Reenable this when LLE USB actually works
CheckMenuItem(settings_menu, ID_EMULATION_LLE_USB, chk_flag);
//chk_flag = (g_Settings->m_core.FlagsLLE & LLE_USB) ? MF_CHECKED : MF_UNCHECKED; // Reenable this when LLE USB actually works
//CheckMenuItem(settings_menu, ID_EMULATION_LLE_USB, chk_flag);

chk_flag = (g_Settings->m_hacks.DisablePixelShaders) ? MF_CHECKED : MF_UNCHECKED;
CheckMenuItem(settings_menu, ID_HACKS_DISABLEPIXELSHADERS, chk_flag);
Expand Down

0 comments on commit 27f2316

Please sign in to comment.