Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Denellyne committed Mar 19, 2024
1 parent cf6d23e commit 6fc73c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions DualSenseToXInput.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
<Filter Include="Source Files\Backend\Debug">
<UniqueIdentifier>{ea1ba039-592b-47ec-934f-e7f6e2324a80}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Backend\Controller\Device Hiding">
<UniqueIdentifier>{76d53dae-9561-43c6-9aac-7b3a0432cf01}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Backend\User Startup Settings">
<UniqueIdentifier>{79f1ab08-ba27-459e-b1c9-445fedf8395e}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -82,9 +85,6 @@
<Filter Include="Source Files\Backend\User Startup Settings\Updater">
<UniqueIdentifier>{c3b8648b-b856-4100-98c6-2da8a56e79d3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Backend\Controller\Device Hiding">
<UniqueIdentifier>{76d53dae-9561-43c6-9aac-7b3a0432cf01}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\main.cpp">
Expand Down
1 change: 0 additions & 1 deletion src/User Settings/Game Profiles/gameProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <format>
#include <string>
#include <thread>
#include <iostream>
#include "GUI\Functions\Misc\functionality.h"
#include "User Settings/Macros/macro.h"
#include "User Settings/Adaptive Triggers/Adaptive Triggers.h"
Expand Down
8 changes: 8 additions & 0 deletions src/User Settings/Game Profiles/saveLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ void saveProfiles(const std::vector<gameProfile> gameProfiles) {
if (saveButtonMapping.is_open()) {
for (int i = 0; i < ARRAYSIZE(profile.buttonMapping); i++)
saveButtonMapping << profile.buttonMapping[i] << '\n';
for(int i = 0;i < ARRAYSIZE(profile.rumbleButton);i++)
saveButtonMapping << profile.rumbleButton[i] << '\n';

saveButtonMapping.close();
}
Expand Down Expand Up @@ -136,10 +138,16 @@ void inline writeProfiles(std::string dirEntry, gameProfile& currentProfile) {
std::ifstream loadButtonMapping(std::format("{}/mapping.txt", dirEntry));
if (loadButtonMapping.is_open()) {
int buttonMappingTemp[20]{};
int buttonRumble[10]{};
for (int i = 0; i < ARRAYSIZE(currentProfile.buttonMapping); i++)
loadButtonMapping >> buttonMappingTemp[i];
for (int i = 0; i < ARRAYSIZE(currentProfile.buttonMapping); i++)
currentProfile.buttonMapping[i] = buttonMappingTemp[i];

for (int i = 0; i < ARRAYSIZE(currentProfile.rumbleButton); i++)
loadButtonMapping >> buttonRumble[i];
for (int i = 0; i < ARRAYSIZE(currentProfile.rumbleButton); i++)
currentProfile.rumbleButton[i] = buttonRumble[i];

loadButtonMapping.close();
}
Expand Down

0 comments on commit 6fc73c5

Please sign in to comment.