When building, the Config initialization was being inherited in a busted way from GlidNUI instead of GlideNUI-wtl, leading to a character of the rom name being interpretted as the current profile (I think)

This changes fixes the ability to read/write custom and user profile settings.

It also turns enables dependencies for GlideNUI and -wtl so they are built before GlideN64, preventing cases on windows where the libs for those weren't already built causing build failure.
This commit is contained in:
Squall-Leonhart authored and Sergey Lipskiy committed 2024-10-19 14:27:08 +07:00
1 parent f4b0755e27
commit f9da98c06a
3 files changed
+13 -12

No files matched your search

+2
View File
@@ -4,7 +4,9 @@ VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLideN64", "GLideN64.vcxproj", "{37D31D7F-C4E7-45B0-AEF6-D6824A243CF7}"
ProjectSection(ProjectDependencies) = postProject
{37CAB375-A7A6-3CAB-BD56-0E954D3FD2FE} = {37CAB375-A7A6-3CAB-BD56-0E954D3FD2FE}
{7BF6F100-31DB-44AE-A2A5-5DDEED9A909C} = {7BF6F100-31DB-44AE-A2A5-5DDEED9A909C}
{9E05B70F-A294-44A9-A151-B2CC95AA884E} = {9E05B70F-A294-44A9-A151-B2CC95AA884E}
{DA965BCF-2219-47AF-ACE7-EAF76D5D4756} = {DA965BCF-2219-47AF-ACE7-EAF76D5D4756}
EndProjectSection
EndProject
+7 -8
View File
@@ -15,8 +15,7 @@ Q_IMPORT_PLUGIN(QICOPlugin)
//#define RUN_DIALOG_IN_THREAD
static
int openConfigDialog(const wchar_t * _strFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy, bool & _accepted)
static int openConfigDialog(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy, bool & _accepted)
{
std::string IniFolder;
uint32_t slength = WideCharToMultiByte(CP_ACP, 0, _strFileName, -1, NULL, 0, NULL, NULL);
@@ -40,22 +39,22 @@ int openConfigDialog(const wchar_t * _strFileName, const char * _romName, unsign
return 0;
}
bool runConfigThread(const wchar_t * _strFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy)
bool runConfigThread(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy)
{
bool accepted = false;
#ifdef RUN_DIALOG_IN_THREAD
std::thread configThread(openConfigDialog, _strFileName, _maxMSAALevel, std::ref(accepted));
configThread.join();
#else
openConfigDialog(_strFileName, _romName, _maxMSAALevel, _maxAnisotropy, accepted);
openConfigDialog(_strFileName, _strSharedFileName, _romName, _maxMSAALevel, _maxAnisotropy, accepted);
#endif
return accepted;
}
EXPORT bool CALL RunConfig(const wchar_t * _strFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy)
EXPORT bool CALL RunConfig(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy)
{
return runConfigThread(_strFileName, _romName, _maxMSAALevel, _maxAnisotropy);
return runConfigThread(_strFileName, _strSharedFileName, _romName, _maxMSAALevel, _maxAnisotropy);
}
EXPORT int CALL RunAbout(const wchar_t * _strFileName)
@@ -73,7 +72,7 @@ EXPORT int CALL RunAbout(const wchar_t * _strFileName)
return 0;
}
EXPORT void CALL LoadConfig(const wchar_t * _strFileName)
EXPORT void CALL LoadConfig(const wchar_t * _strFileName, const wchar_t * _strSharedFileName)
{
std::string IniFolder;
uint32_t slength = WideCharToMultiByte(CP_ACP, 0, _strFileName, -1, NULL, 0, NULL, NULL);
@@ -84,7 +83,7 @@ EXPORT void CALL LoadConfig(const wchar_t * _strFileName)
loadSettings(IniFolder.c_str());
}
EXPORT void CALL LoadCustomRomSettings(const wchar_t * _strFileName, const char * _romName)
EXPORT void CALL LoadCustomRomSettings(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName)
{
std::string IniFolder;
uint32_t slength = WideCharToMultiByte(CP_ACP, 0, _strFileName, -1, NULL, 0, NULL, NULL);
+4 -4
View File
@@ -13,10 +13,10 @@ extern "C" {
#define CALL
#endif
EXPORT bool CALL RunConfig(const wchar_t * _strFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy);
EXPORT int CALL RunAbout(const wchar_t * _strFileName);
EXPORT void CALL LoadConfig(const wchar_t * _strFileName);
EXPORT void CALL LoadCustomRomSettings(const wchar_t * _strFileName, const char * _romName);
EXPORT bool CALL RunConfig(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName, unsigned int _maxMSAALevel, unsigned int _maxAnisotropy);
EXPORT int CALL RunAbout(const wchar_t * _strFileName);
EXPORT void CALL LoadConfig(const wchar_t * _strFileName, const wchar_t * _strSharedFileName);
EXPORT void CALL LoadCustomRomSettings(const wchar_t * _strFileName, const wchar_t * _strSharedFileName, const char * _romName);
#if defined(__cplusplus)
}