Skip to content
Permalink
Browse files

Use settings ini file method (#1370)

* Import SimpleIni module

* Rename XBController to DInputController

Since it's only about configure DirectInput support.

* Append to previous 2 commits

* Initialize Settings class

* Append to previous commit

* Properly use EmuXTL header instead of EmuShared

* Move audio variables into setting class

* Move video variables into Settings class

* Append to previous commit

* Move hack variables into Settings class

* Append previous commit

* Append to third previous commit

* Move xbox controller port map to Settings class

* Append to second previous commit

* Move DirectInput Controller map to Settings class

* Remove old XInput member variable

* Append to second previous commit

* Tiny Fixup

* Remove Load/Save from EmuShared class

* Move both GUI and emulate/core to Settings class

* Oops, append to DirectInput controller's commit(s)

* Fix spaces to tab plus remove useless extra spaces

* Code format fixes

* Fix EmuShared's Set____ function to include const type.

Then "set" functions are supportive for both const and non-const variables.

* Add Sync and GetDataLocation functions to Settings class

* Move include filesystem into root header file.

* Introduce Verify function in Settings class

* Fix old bug for console remains open

* Making some adjustments...

* Append

* Another fix for any output prints crash.

* Add Delete function to Settings class

Plus keep save's file path if has given one.

* Fix LLE_USB to set into Settings class' member variable.

* No longer rely on GUI's end to reset LLE flags for multi-xbe titles.

* Simulate what GUI will do except in standalone kernel mode support.

* Move m_StorageLocation into Settings class as central.

Plus optimization for GetDataLocation function.

* Update sentence...

* Remove m_XbePath from EmuShared class.

Since kernel process is launching by on its own without rely on GUI process.

* Update copyright

* Fix DirectInput config not responding message

* Implement new feature: Bypass running as admin warning message

* Rename Emulate Settings to Core Settings

Plus move AllowAdminPrivilage option to core.

* Add reserve space for Settings' structure to integrate into EmuShared

* Ensure all reserves are set to 0 by default.

* Append to "Rename Emulate Settings to Core Settings" commit

* Fix rebase loss.

* Fix kernel mode process's window screen

* Correction: use bool for allowAdminPrivilege and add a save data

* Few fixes for allowAdminPrivilege

* Implement support to prevent tamper shared memory between GUI processes.

NOTE: Kernel process will be using same shared memory since guiProcessID will remain as 0.

* Various improvement

* Use std library functions
* Use single column spaces for align support on different tab size
* Include failsafe if custom and file path string values are bad format

Apparently ARRAYSIZE isn't define on other compilers.

* Last ARRAYSIZE replacement plus buffer overflow protection

* Replace WinAPI to std library's filesystem

* Revert support for 2+ emulation process at same time.

Emulation's graphic screen has corruption between both windows. Not even a wrapper to D3D9 will fix it.
  • Loading branch information...
RadWolfie authored and LukeUsher committed Aug 7, 2018
1 parent bdd929e commit 07a05f0e52d55768ddda27fc78a30b36c14afbbe
@@ -10,3 +10,6 @@
[submodule "import/XbSymbolDatabase"]
path = import/XbSymbolDatabase
url = https://github.com/Cxbx-Reloaded/XbSymbolDatabase.git
[submodule "import/simpleini"]
path = import/simpleini
url = https://github.com/brofield/simpleini
@@ -102,7 +102,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\src\Common;..\..\src;..\..\src\Common\Win32;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\import\subhook\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\Common;..\..\src;..\..\src\Common\Win32;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\import\subhook\;..\..\import\simpleini</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NOMINMAX;_WIN32_WINNT=0x0601;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -162,7 +162,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\src\Common;..\..\src;..\..\src\Common\Win32;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\import\subhook\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\Common;..\..\src;..\..\src\Common\Win32;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\import\subhook\;..\..\import\simpleini</AdditionalIncludeDirectories>
<PreprocessorDefinitions>CXBX_USE_D3D9;NOMINMAX;_WIN32_WINNT=0x0601;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -223,7 +223,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\src;..\..\src\Common;..\..\src\Common\Win32\;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\src\Common\Win32;..\..\import\subhook\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src;..\..\src\Common;..\..\src\Common\Win32\;%(AdditionalIncludeDirectories);..\..\import\OpenXDK\include;..\..\import\distorm\include;..\..\import\glew-2.0.0\include;..\..\src\Common\Win32;..\..\import\subhook\;..\..\import\simpleini</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NOMINMAX;_WIN32_WINNT=0x0601;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -284,9 +284,9 @@
<ClInclude Include="..\..\src\Common\CxbxCommon.h" />
<ClInclude Include="..\..\src\Common\Input\InputConfig.h" />
<ClInclude Include="..\..\src\Common\Input\SDL2_Device.h" />
<ClInclude Include="..\..\src\Common\Settings.hpp" />
<ClInclude Include="..\..\src\Common\Win32\Threads.h" />
<ClInclude Include="..\..\src\Common\CxbxDebugger.h" />
<ClInclude Include="..\..\src\Common\Win32\XBAudio.h" />
<ClInclude Include="..\..\src\Common\Win32\XBPortMapping.h" />
<ClInclude Include="..\..\src\Common\XADPCM.h" />
<ClInclude Include="..\..\src\Common\XbePrinter.h" />
@@ -352,9 +352,8 @@
<ClInclude Include="..\..\src\Cxbx\ResCxbx.h" />
<ClInclude Include="..\..\src\Cxbx\Wnd.h" />
<ClInclude Include="..\..\src\Cxbx\WndMain.h" />
<ClInclude Include="..\..\src\Common\Win32\XBController.h" />
<ClInclude Include="..\..\src\Common\Win32\DInputController.h" />
<ClInclude Include="..\..\src\Common\Xbe.h" />
<ClInclude Include="..\..\src\Common\Win32\XBVideo.h" />
<ClInclude Include="..\..\src\devices\ADM1032Device.h" />
<ClInclude Include="..\..\src\devices\EEPROMDevice.h" />
<ClInclude Include="..\..\src\devices\EmuNVNet.h" />
@@ -427,10 +426,10 @@
<ClCompile Include="..\..\src\Common\CxbxCommon.cpp" />
<ClCompile Include="..\..\src\Common\Input\InputConfig.cpp" />
<ClCompile Include="..\..\src\Common\Input\SDL2_Device.cpp" />
<ClCompile Include="..\..\src\Common\Settings.cpp" />
<ClCompile Include="..\..\src\Common\Win32\InlineFunc.cpp" />
<ClCompile Include="..\..\src\Common\Win32\Threads.cpp" />
<ClCompile Include="..\..\src\Common\CxbxDebugger.cpp" />
<ClCompile Include="..\..\src\Common\Win32\XBAudio.cpp" />
<ClCompile Include="..\..\src\Common\Win32\XBPortMapping.cpp" />
<ClCompile Include="..\..\src\Common\XbePrinter.cpp" />
<ClCompile Include="..\..\src\CxbxKrnl\crc32c.cpp" />
@@ -709,7 +708,7 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\XBController.cpp">
<ClCompile Include="..\..\src\Common\Win32\DInputController.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -725,14 +724,6 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\XBVideo.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug_Direct3D9|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\src\devices\ADM1032Device.cpp" />
<ClCompile Include="..\..\src\devices\EEPROMDevice.cpp" />
<ClCompile Include="..\..\src\devices\EmuNVNet.cpp" />
@@ -94,15 +94,9 @@
<ClCompile Include="..\..\src\Common\Win32\Mutex.cpp">
<Filter>Shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\XBController.cpp">
<Filter>Shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Xbe.cpp">
<Filter>Shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\XBVideo.cpp">
<Filter>Shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\CxbxKrnl\CxbxKrnl.cpp">
<Filter>Emulator</Filter>
</ClCompile>
@@ -184,9 +178,6 @@
<ClCompile Include="..\..\src\Cxbx\DlgAudioConfig.cpp">
<Filter>GUI</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\XBAudio.cpp">
<Filter>Shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\CxbxKrnl\PhysicalMemory.cpp">
<Filter>Emulator</Filter>
</ClCompile>
@@ -317,6 +308,12 @@
<ClCompile Include="..\..\src\Common\CxbxCommon.cpp">
<Filter>Cross Platform</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Settings.cpp">
<Filter>Cross Platform</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Common\Win32\DInputController.cpp">
<Filter>Shared</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Cxbx\DlgControllerConfig.h">
@@ -352,6 +349,9 @@
<ClInclude Include="..\..\src\CxbxKrnl\EmuKrnlLogging.h">
<Filter>Kernel</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Cxbx.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\CxbxKrnl\Emu.h">
<Filter>Shared</Filter>
</ClInclude>
@@ -367,15 +367,9 @@
<ClInclude Include="..\..\src\Cxbx\ResCxbx.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\Win32\XBController.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\Xbe.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\Win32\XBVideo.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\CxbxKrnl\CxbxKrnl.h">
<Filter>Emulator</Filter>
</ClInclude>
@@ -472,9 +466,6 @@
<ClInclude Include="..\..\src\Cxbx\DlgAudioConfig.h">
<Filter>GUI</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\Win32\XBAudio.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\CxbxKrnl\PhysicalMemory.h">
<Filter>Emulator</Filter>
</ClInclude>
@@ -616,12 +607,16 @@
<ClInclude Include="..\..\src\Common\Input\SDL2_Device.h">
<Filter>Shared\Input</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Cxbx.h">
<Filter>Shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\CxbxCommon.h">
<Filter>Cross Platform</Filter>
</ClInclude>
<ClInclude Include="DlgXboxControllerPortMapping.h" />
<ClInclude Include="..\..\src\Common\Settings.hpp">
<Filter>Cross Platform</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Common\Win32\DInputController.h">
<Filter>Shared</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\resource\Splash.jpg">
Submodule simpleini added at 2af65f
@@ -499,6 +499,7 @@ BEGIN
MENUITEM "Skip rdtsc patching", ID_HACKS_SKIPRDTSCPATCHING,MFT_STRING,MFS_ENABLED
MENUITEM "Scale Xbox viewport to host (and back)", ID_HACKS_SCALEVIEWPORT,MFT_STRING,MFS_ENABLED
END
MENUITEM "Allow Admin Privilege", ID_SETTINGS_ALLOWADMINPRIVILEGE,MFT_STRING,MFS_ENABLED
MENUITEM MFT_SEPARATOR
MENUITEM "Reset To Defaults", ID_SETTINGS_INITIALIZE,MFT_STRING,MFS_ENABLED
END
Oops, something went wrong.

0 comments on commit 07a05f0

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.