Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
SirMangler committed Dec 10, 2023
1 parent 1dd9bc3 commit b125907
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@ void ElfModLoader::load_presets(std::string const& path) {
case CVarType::INT16:
var_it->second.value = static_cast<u16>(strtoul(var_val.c_str(), nullptr, 10));
case CVarType::INT32:
var_it->second.value = strtoul(var_val.c_str(), nullptr, 10);
var_it->second.value = static_cast<u32>(strtoul(var_val.c_str(), nullptr, 10));
break;
case CVarType::INT64:
var_it->second.value = strtoull(var_val.c_str(), nullptr, 10);
var_it->second.value = static_cast<u64>(strtoull(var_val.c_str(), nullptr, 10));
break;
case CVarType::FLOAT32:
var_it->second.value = strtof(var_val.c_str(), nullptr);
var_it->second.value = static_cast<float>(strtof(var_val.c_str(), nullptr));
break;
case CVarType::FLOAT64:
var_it->second.value = strtod(var_val.c_str(), nullptr);
var_it->second.value = static_cast<double>(strtod(var_val.c_str(), nullptr));
break;
}
}
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Core/PrimeHack/PrimeMod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ void PrimeMod::set_state(ModState new_state) {
}

void PrimeMod::set_state_no_notify(ModState new_state) {
ModState original = this->state;
this->state = new_state;
}

Expand Down
27 changes: 27 additions & 0 deletions Source/Core/DolphinLib.props
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,29 @@
<ClCompile Include="Core\WiiRoot.cpp" />
<ClCompile Include="Core\WiiUtils.cpp" />
<ClCompile Include="Core\WC24PatchEngine.cpp" />
<ClCompile Include="Core\PrimeHack\HackConfig.cpp" />
<ClCompile Include="Core\PrimeHack\HackManager.cpp" />
<ClCompile Include="Core\PrimeHack\AddressDB.cpp" />
<ClCompile Include="Core\PrimeHack\AddressDBInit.cpp" />
<ClCompile Include="Core\PrimeHack\PrimeMod.cpp" />
<ClCompile Include="Core\PrimeHack\PrimeUtils.cpp" />
<ClCompile Include="Core\PrimeHack\EmuVariableManager.cpp" />
<ClCompile Include="Core\PrimeHack\Quaternion.cpp" />
<ClCompile Include="Core\PrimeHack\Transform.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\AutoEFB.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\BloomIntensityMP3.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\ContextSensitiveControls.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\CutBeamFxMP1.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\DisableHudMemoPopup.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\ElfModLoader.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\FpsControls.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\MapController.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\Motd.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\Noclip.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\PortalSkipMP2.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\SpringballButton.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\STRGPatch.cpp" />
<ClCompile Include="Core\PrimeHack\Mods\ViewModifier.cpp" />
<ClCompile Include="DiscIO\Blob.cpp" />
<ClCompile Include="DiscIO\CISOBlob.cpp" />
<ClCompile Include="DiscIO\CompressedBlob.cpp" />
Expand Down Expand Up @@ -1143,6 +1166,8 @@
<ClCompile Include="InputCommon\ControllerEmu\ControlGroup\Slider.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\ControlGroup\Tilt.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\ControlGroup\Triggers.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\ControlGroup\PrimeHackModes.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\ControlGroup\PrimeHackAltProfile.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\ControllerEmu.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\Setting\NumericSetting.cpp" />
<ClCompile Include="InputCommon\ControllerEmu\StickGate.cpp" />
Expand All @@ -1166,11 +1191,13 @@
<ClCompile Include="InputCommon\ControlReference\FunctionExpression.cpp" />
<ClCompile Include="InputCommon\DynamicInputTextures\DITConfiguration.cpp" />
<ClCompile Include="InputCommon\DynamicInputTextures\DITSpecification.cpp" />
<ClCompile Include="InputCommon\DInputMouseAbsolute.cpp" />
<ClCompile Include="InputCommon\DynamicInputTextureManager.cpp" />
<ClCompile Include="InputCommon\GCAdapter.cpp" />
<ClCompile Include="InputCommon\ImageOperations.cpp" />
<ClCompile Include="InputCommon\InputConfig.cpp" />
<ClCompile Include="InputCommon\InputProfile.cpp" />
<ClCompile Include="InputCommon\GenericMouse.cpp" />
<ClCompile Include="UICommon\AutoUpdate.cpp" />
<ClCompile Include="UICommon\CommandLineParse.cpp" />
<ClCompile Include="UICommon\Disassembler.cpp" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/CVarsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void CVarListModel::get_column_widths(QFont const& font, std::array<int, CVarLis
for (size_t i = 0; i < width_out.size(); i++) {
int col_size = 0;
for (size_t j = 0; j < cvar_list.size(); j++) {
auto text = data(index(j, i));
auto text = data(index(static_cast<int>(j), static_cast<int>(i)));
#if QT_VERSION >= 0x050b00
col_size = std::max(col_size, fm.horizontalAdvance(text.toString()));
#else
Expand Down
16 changes: 15 additions & 1 deletion Source/Core/DolphinQt/DolphinQt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
<ClCompile Include="Config\Graphics\PostProcessingConfigWindow.cpp" />
<ClCompile Include="Config\GraphicsModListWidget.cpp" />
<ClCompile Include="Config\GraphicsModWarningWidget.cpp" />
<ClCompile Include="Config\Graphics\PrimeWidget.cpp" />
<ClCompile Include="Config\InfoWidget.cpp" />
<ClCompile Include="Config\LogConfigWidget.cpp" />
<ClCompile Include="Config\LogWidget.cpp" />
<ClCompile Include="Config\PrimeCheatsWidget.cpp" />
<ClCompile Include="Config\Mapping\FreeLookGeneral.cpp" />
<ClCompile Include="Config\Mapping\FreeLookRotation.cpp" />
<ClCompile Include="Config\Mapping\GBAPadEmu.cpp" />
Expand All @@ -108,6 +110,7 @@
<ClCompile Include="Config\Mapping\HotkeyTAS.cpp" />
<ClCompile Include="Config\Mapping\HotkeyUSBEmu.cpp" />
<ClCompile Include="Config\Mapping\HotkeyWii.cpp" />
<ClCompile Include="Config\Mapping\HotkeyPrimeHack.cpp" />
<ClCompile Include="Config\Mapping\IOWindow.cpp" />
<ClCompile Include="Config\Mapping\MappingButton.cpp" />
<ClCompile Include="Config\Mapping\MappingCommon.cpp" />
Expand All @@ -118,7 +121,11 @@
<ClCompile Include="Config\Mapping\WiimoteEmuExtension.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuExtensionMotionInput.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuExtensionMotionSimulation.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuGeneral.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuGeneral.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuMetroid.cpp" />
<ClCompile Include="Config\Mapping\PrimeHackEmuWii.cpp" />
<ClCompile Include="Config\Mapping\PrimeHackEmuGC.cpp" />
<ClCompile Include="Config\Mapping\GCPadEmuMetroid.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuMotionControl.cpp" />
<ClCompile Include="Config\Mapping\WiimoteEmuMotionControlIMU.cpp" />
<ClCompile Include="Config\NewPatchDialog.cpp" />
Expand Down Expand Up @@ -177,6 +184,7 @@
<ClCompile Include="NetPlay\PadMappingDialog.cpp" />
<ClCompile Include="NANDRepairDialog.cpp" />
<ClCompile Include="NKitWarningDialog.cpp" />
<ClCompile Include="CVarsWindow.cpp" />
<ClCompile Include="pch_qt.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
Expand Down Expand Up @@ -298,9 +306,11 @@
<QtMoc Include="Config\Graphics\PostProcessingConfigWindow.h" />
<QtMoc Include="Config\GraphicsModListWidget.h" />
<QtMoc Include="Config\GraphicsModWarningWidget.h" />
<QtMoc Include="Config\Graphics\PrimeWidget.h" />
<QtMoc Include="Config\InfoWidget.h" />
<QtMoc Include="Config\LogConfigWidget.h" />
<QtMoc Include="Config\LogWidget.h" />
<QtMoc Include="Config\PrimeCheatsWidget.h" />
<QtMoc Include="Config\Mapping\FreeLookGeneral.h" />
<QtMoc Include="Config\Mapping\FreeLookRotation.h" />
<QtMoc Include="Config\Mapping\GBAPadEmu.h" />
Expand All @@ -327,6 +337,9 @@
<QtMoc Include="Config\Mapping\WiimoteEmuExtensionMotionInput.h" />
<QtMoc Include="Config\Mapping\WiimoteEmuExtensionMotionSimulation.h" />
<QtMoc Include="Config\Mapping\WiimoteEmuGeneral.h" />
<QtMoc Include="Config\Mapping\WiimoteEmuMetroid.h" />
<QtMoc Include="Config\Mapping\PrimeHackEmuWii.h" />
<QtMoc Include="Config\Mapping\PrimeHackEmuGC.h" />
<QtMoc Include="Config\Mapping\WiimoteEmuMotionControl.h" />
<QtMoc Include="Config\Mapping\WiimoteEmuMotionControlIMU.h" />
<QtMoc Include="Config\PropertiesDialog.h" />
Expand Down Expand Up @@ -414,6 +427,7 @@
<QtMoc Include="TAS\TASSpinBox.h" />
<QtMoc Include="TAS\WiiTASInputWindow.h" />
<QtMoc Include="ToolBar.h" />
<QtMoc Include="CvarsWindow.h" />
<QtMoc Include="Updater.h" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit b125907

Please sign in to comment.