Merge pull request #1995 from flagrama/linux-fixes

Linux fixes
This commit is contained in:
zilmar 2021-03-01 20:10:49 +10:30 committed by GitHub
commit b8206c5043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 94 additions and 78 deletions

View File

@ -4,6 +4,7 @@
#include <strings.h>
#endif
#include "stdafx.h"
#include "FileClass.h"
#include "CriticalSection.h"
#include <string>

View File

@ -4,6 +4,7 @@
#include <alloca.h>
#include <stdarg.h>
#define stricmp strcasecmp
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
#define _snprintf snprintf

View File

@ -1,5 +1,5 @@
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
class CThread
{

View File

@ -1,7 +1,7 @@
#include <Common\path.h>
#include <Common\IniFileClass.h>
#include <Common\StdString.h>
#include <Project64-core\N64System\Enhancement\EnhancementFile.h>
#include <Common/path.h>
#include <Common/IniFileClass.h>
#include <Common/StdString.h>
#include <Project64-core/N64System/Enhancement/EnhancementFile.h>
#include <algorithm>
#include <set>
#include <windows.h>

View File

@ -9,7 +9,7 @@
#include <Project64-core/Plugins/PluginClass.h>
#include <Project64-core/N64System/N64RomClass.h>
#include <Project64-core/N64System/N64DiskClass.h>
#include <Project64-core\N64System\Enhancement\Enhancements.h>
#include <Project64-core/N64System/Enhancement/Enhancements.h>
#include "Settings/SettingType/SettingsType-Application.h"
static void FixDirectories(void);

View File

@ -9,10 +9,10 @@
* *
****************************************************************************/
#include "stdafx.h"
#include <Project64-core\N64System\Enhancement\Enhancement.h>
#include <Project64-core\Settings\SettingType\SettingsType-GameSetting.h>
#include <Project64-core\N64System\SystemGlobals.h>
#include <Project64-core\N64System\N64Class.h>
#include <Project64-core/N64System/Enhancement/Enhancement.h>
#include <Project64-core/Settings/SettingType/SettingsType-GameSetting.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/N64Class.h>
#pragma warning(disable:4996)

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include <string>
#include <vector>

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#include "stdafx.h"
#include <Project64-core\N64System\Enhancement\EnhancementFile.h>
#include <Project64-core/N64System/Enhancement/EnhancementFile.h>
#pragma warning(disable:4996)

View File

@ -9,10 +9,10 @@
* *
****************************************************************************/
#pragma once
#include <Project64-core\N64System\Enhancement\Enhancement.h>
#include <Project64-core\N64System\Enhancement\EnhancementList.h>
#include <Common\FileClass.h>
#include <Common\CriticalSection.h>
#include <Project64-core/N64System/Enhancement/Enhancement.h>
#include <Project64-core/N64System/Enhancement/EnhancementList.h>
#include <Common/FileClass.h>
#include <Common/CriticalSection.h>
#include <set>
#include <string>
#include <map>

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#include "stdafx.h"
#include <Project64-core\N64System\Enhancement\EnhancementList.h>
#include <Project64-core/N64System/Enhancement/EnhancementList.h>
CEnhancementList::CEnhancementList()
{

View File

@ -9,9 +9,10 @@
* *
****************************************************************************/
#pragma once
#include <Common/stdafx.h>
#include <vector>
#include <string>
#include <Project64-core\N64System\Enhancement\Enhancement.h>
#include <Project64-core/N64System/Enhancement/Enhancement.h>
struct EnhancementItemList_compare
{

View File

@ -9,18 +9,18 @@
* *
****************************************************************************/
#include "stdafx.h"
#include <Project64-core\N64System\Enhancement\Enhancements.h>
#include <Project64-core\N64System\Enhancement\EnhancementFile.h>
#include <Project64-core\N64System\Mips\MemoryVirtualMem.h>
#include <Project64-core\N64System\Recompiler\RecompilerClass.h>
#include <Project64-core\N64System\SystemGlobals.h>
#include <Project64-core\Plugins\PluginClass.h>
#include <Project64-core\Plugins\GFXPlugin.h>
#include <Project64-core\Plugins\AudioPlugin.h>
#include <Project64-core\Plugins\RSPPlugin.h>
#include <Project64-core\Plugins\ControllerPlugin.h>
#include <Common\path.h>
#include <Common\Util.h>
#include <Project64-core/N64System/Enhancement/Enhancements.h>
#include <Project64-core/N64System/Enhancement/EnhancementFile.h>
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
#include <Project64-core/N64System/Recompiler/RecompilerClass.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/Plugins/PluginClass.h>
#include <Project64-core/Plugins/GFXPlugin.h>
#include <Project64-core/Plugins/AudioPlugin.h>
#include <Project64-core/Plugins/RSPPlugin.h>
#include <Project64-core/Plugins/ControllerPlugin.h>
#include <Common/path.h>
#include <Common/Util.h>
CEnhancements::CEnhancements() :
m_ScanFileThread(stScanFileThread),

View File

@ -9,10 +9,10 @@
* *
****************************************************************************/
#pragma once
#include <Project64-core\N64System\Enhancement\EnhancementFile.h>
#include <Project64-core\N64System\Enhancement\EnhancementList.h>
#include <Common\Thread.h>
#include <Common\CriticalSection.h>
#include <Project64-core/N64System/Enhancement/EnhancementFile.h>
#include <Project64-core/N64System/Enhancement/EnhancementList.h>
#include <Common/Thread.h>
#include <Common/CriticalSection.h>
#include <map>
#include <string>

View File

@ -155,7 +155,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
CPath SearchDir((const char *)m_GameDir, "*");
SearchDir.AppendDirectory(Directory);
WriteTrace(TraceRomList, TraceVerbose, "SearchPath: %s", (const char *)SearchPath);
WriteTrace(TraceRomList, TraceVerbose, "SearchDir: %s", (const char *)SearchDir);
if (!SearchDir.FindFirst(CPath::FIND_ATTRIBUTE_ALLFILES))
{
WriteTrace(TraceRomList, TraceVerbose, "No files found");
@ -165,7 +165,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory)
do
{
WriteTrace(TraceRomList, TraceVerbose, "Found: \"%s\" m_StopRefresh = %s", (const char *)SearchPath, m_StopRefresh ? "true" : "false");
WriteTrace(TraceRomList, TraceVerbose, "Found: \"%s\" m_StopRefresh = %s", (const char *)SearchDir, m_StopRefresh ? "true" : "false");
if (m_StopRefresh)
{
WriteTrace(TraceRomList, TraceVerbose, "stop refresh set, stopping");

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#pragma once
#include <Project64-core\Settings\SettingType\SettingsType-Application.h>
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
class CSettingTypeGame :
public CSettingTypeApplication

View File

@ -98,6 +98,8 @@ void CSettingTypeRDBSaveChip::Save (uint32_t /*Index*/, bool /*Value*/ )
void CSettingTypeRDBSaveChip::Save (uint32_t /*Index*/, uint32_t Value )
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
switch (Value)
{
case SaveChip_Auto: m_SettingsIniFile->SaveString(m_SectionIdent->c_str(),m_KeyName.c_str(),"First Save Type"); break;
@ -108,6 +110,7 @@ void CSettingTypeRDBSaveChip::Save (uint32_t /*Index*/, uint32_t Value )
default:
g_Notify->BreakPoint(__FILE__, __LINE__);
}
#pragma GCC diagnostic pop
}
void CSettingTypeRDBSaveChip::Save (uint32_t /*Index*/, const std::string & /*Value*/ )

View File

@ -1,5 +1,5 @@
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include <guiddef.h>
enum BtnType

View File

@ -2,7 +2,7 @@
#include "ControllerSpec1.1.h"
#include "DirectInput.h"
#include "N64Controller.h"
#include <Common\CriticalSection.h>
#include <Common/CriticalSection.h>
#include <memory>
class CProject64Input

View File

@ -1,6 +1,6 @@
#include "DirectInput.h"
#include <Common\StdString.h>
#include <Common\SyncEvent.h>
#include <Common/StdString.h>
#include <Common/SyncEvent.h>
#include <set>
#include "CProject64Input.h"

View File

@ -3,7 +3,7 @@
#include "Button.h"
#include "DeviceNotification.h"
#include "N64Controller.h"
#include <Common\CriticalSection.h>
#include <Common/CriticalSection.h>
#define DIRECTINPUT_VERSION 0x0800
#include <Windows.h>
#include <dinput.h>

View File

@ -4,8 +4,8 @@
#include "wtl-BitmapPicture.h"
#include "wtl-ScanButton.h"
#include "OptionsUI.h"
#include <Common\stdtypes.h>
#include <Common\StdString.h>
#include <Common/stdtypes.h>
#include <Common/StdString.h>
#include "resource.h"
class CInputConfigUI;

View File

@ -1,5 +1,5 @@
#include <Settings/Settings.h>
#include <Common\StdString.h>
#include <Common/StdString.h>
#include "InputSettingsID.h"
#include "InputSettings.h"

View File

@ -1,5 +1,5 @@
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include <string>
#include "N64Controller.h"
#include "ControllerSpec1.1.h"

View File

@ -1,7 +1,7 @@
#include "OptionsUI.h"
#include "wtl.h"
#include "resource.h"
#include <Common\StdString.h>
#include <Common/StdString.h>
class COptionsDlg :
public CDialogImpl<COptionsDlg>

View File

@ -1,5 +1,5 @@
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include "ControllerSpec1.1.h"
#include "N64Controller.h"

View File

@ -1,6 +1,6 @@
#include "wtl-ScanButton.h"
#include "CProject64Input.h"
#include <Common\StdString.h>
#include <Common/StdString.h>
#include <time.h>
CScanButton::CScanButton(BUTTON & Button, int DisplayCtrlId, int ScanBtnId) :

View File

@ -17,7 +17,7 @@
#include <assert.h>
#include <stdio.h>
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include "types.h"
#include "internal.h"

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#include "stdafx.h"
#include <Project64-core\N64System\Enhancement\Enhancements.h>
#include <Project64-core/N64System/Enhancement/Enhancements.h>
CCheatsUI::CCheatsUI(void) :
m_EditCheat(m_Cheats, m_SelectCheat),

View File

@ -10,8 +10,8 @@
****************************************************************************/
#pragma once
#include <Project64\WTLApp.h>
#include <Project64-core\N64System\Enhancement\Enhancement.h>
#include <Project64-core\N64System\Enhancement\EnhancementList.h>
#include <Project64-core/N64System/Enhancement/Enhancement.h>
#include <Project64-core/N64System/Enhancement/EnhancementList.h>
class CEditCheat;
class CCheatsUI;

View File

@ -16,7 +16,7 @@
#include "stdafx.h"
#include "Assembler.h"
#include "Project64-core\N64System\Mips\OpCode.h"
#include "Project64-core/N64System/Mips/OpCode.h"
ASM_PARSE_ERROR CAssembler::m_ParseError = ERR_NONE;
uint32_t CAssembler::m_Address = 0;

View File

@ -9,7 +9,7 @@
* *
****************************************************************************/
#pragma once
#include <Common\stdtypes.h>
#include <Common/stdtypes.h>
#include <map>
class CBreakpoints :

View File

@ -12,7 +12,7 @@
#include <stdafx.h>
#include <Project64-core\N64System\Mips\OpCode.h>
#include <Project64-core/N64System/Mips/OpCode.h>
class COpInfo
{

View File

@ -10,7 +10,7 @@
****************************************************************************/
#include "stdafx.h"
#include <Project64\UserInterface\EnhancementUI.h>
#include <Project64-core\N64System\Enhancement\Enhancements.h>
#include <Project64-core/N64System/Enhancement/Enhancements.h>
class CEditEnhancement :
public CDialogImpl < CEditEnhancement >

View File

@ -1,5 +1,5 @@
#include "stdafx.h"
#include <Common\md5.h>
#include <Common/md5.h>
#include <time.h>
#include <windows.h>
#include <Wininet.h>

View File

@ -10,8 +10,8 @@
****************************************************************************/
#pragma once
#include <Project64-core\Plugin.h>
#include <Project64\Plugins\PluginList.h>
#include <Project64-core/Plugin.h>
#include <Project64/Plugins/PluginList.h>
class CGamePluginPage :
public CSettingsPageImpl<CGamePluginPage>,

View File

@ -10,7 +10,7 @@
****************************************************************************/
#pragma once
#include <Project64-core\Plugin.h>
#include <Project64-core/Plugin.h>
class COptionPluginPage :
public CSettingsPageImpl<COptionPluginPage>,

View File

@ -1,6 +1,6 @@
#include "stdafx.h"
#include "GetCWindowText.h"
#include <Common\StdString.h>
#include <Common/StdString.h>
std::string GetCWindowText(const CWindow & window)
{

View File

@ -1,7 +1,7 @@
#include "stdafx.h"
#include <Project64-core\AppInit.h>
#include "UserInterface\WelcomeScreen.h"
#include "Settings\UISettings.h"
#include <Project64-core/AppInit.h>
#include "UserInterface/WelcomeScreen.h"
#include "Settings/UISettings.h"
int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/)
{

View File

@ -5,6 +5,7 @@ mkdir -p $obj/Multilanguage
mkdir -p $obj/N64System/Mips
mkdir -p $obj/N64System/interp
mkdir -p $obj/N64System/dynarec
mkdir -p $obj/N64System/enhan
mkdir -p $obj/Plugins
mkdir -p $obj/Settings/type
@ -29,7 +30,10 @@ $CC -o $obj/AppInit.asm $src/AppInit.cpp $C_FLAGS
$CC -o $obj/logging.asm $src/Logging.cpp $C_FLAGS
$CC -o $obj/MemoryExceptionFilter.asm $src/MemoryExceptionFilter.cpp $C_FLAGS
$CC -o $obj/Multilanguage/LangClass.asm $src/Multilanguage/LanguageClass.cpp $C_FLAGS
$CC -o $obj/N64System/CheatClass.asm $src/N64System/CheatClass.cpp $C_FLAGS
$CC -o $obj/N64System/enhan/Enhance.asm $src/N64System/Enhancement/Enhancement.cpp $C_FLAGS
$CC -o $obj/N64System/enhan/List.asm $src/N64System/Enhancement/EnhancementList.cpp $C_FLAGS
$CC -o $obj/N64System/enhan/File.asm $src/N64System/Enhancement/EnhancementFile.cpp $C_FLAGS
$CC -o $obj/N64System/enhan/Enhans.asm $src/N64System/Enhancement/Enhancements.cpp $C_FLAGS
$CC -o $obj/N64System/EmuThread.asm $src/N64System/EmulationThread.cpp $C_FLAGS
$CC -o $obj/N64System/FPSClass.asm $src/N64System/FramePerSecondClass.cpp $C_FLAGS
$CC -o $obj/N64System/interp/CPU.asm $src/N64System/Interpreter/InterpreterCPU.cpp $C_FLAGS
@ -67,6 +71,7 @@ $CC -o $obj/N64System/dynarec/Ops.asm $src/N64System/Recompiler/x86/x86Recompi
$CC -o $obj/N64System/dynarec/Reg.asm $src/N64System/Recompiler/x86/x86RegInfo.cpp $C_FLAGS
$CC -o $obj/N64System/dynarec/Sect.asm $src/N64System/Recompiler/SectionInfo.cpp $C_FLAGS
$CC -o $obj/N64System/dynarec/log.asm $src/N64System/Recompiler/RecompilerCodeLog.cpp $C_FLAGS
$CC -o $obj/N64System/dynarec/RegB.asm $src/N64System/Recompiler/RegBase.cpp $C_FLAGS
$CC -o $obj/N64System/dynarec/x86op.asm $src/N64System/Recompiler/x86/x86ops.cpp $C_FLAGS
$CC -o $obj/N64System/SpeedLimiter.asm $src/N64System/SpeedLimiterClass.cpp $C_FLAGS
$CC -o $obj/N64System/SystemGlobals.asm $src/N64System/SystemGlobals.cpp $C_FLAGS
@ -82,11 +87,10 @@ $CC -o $obj/Settings/Game.asm $src/Settings/GameSettings.cpp $C_FLAGS
$CC -o $obj/Settings/Logging.asm $src/Settings/LoggingSettings.cpp $C_FLAGS
$CC -o $obj/Settings/N64System.asm $src/Settings/N64SystemSettings.cpp $C_FLAGS
$CC -o $obj/Settings/Recompiler.asm $src/Settings/RecompilerSettings.cpp $C_FLAGS
$CC -o $obj/Settings/SettingsClass.asm $src/Settings/SettingsClass.cpp $C_FLAGS
$CC -o $obj/Settings.asm $src/Settings.cpp $C_FLAGS
$CC -o $obj/Settings/type/App.asm $src/Settings/SettingType/SettingsType-Application.cpp $C_FLAGS
$CC -o $obj/Settings/type/AppIndex.asm $src/Settings/SettingType/SettingsType-ApplicationIndex.cpp $C_FLAGS
$CC -o $obj/Settings/type/AppPath.asm $src/Settings/SettingType/SettingsType-ApplicationPath.cpp $C_FLAGS
$CC -o $obj/Settings/type/Cheats.asm $src/Settings/SettingType/SettingsType-Cheats.cpp $C_FLAGS
$CC -o $obj/Settings/type/GSetting.asm $src/Settings/SettingType/SettingsType-GameSetting.cpp $C_FLAGS
$CC -o $obj/Settings/type/GSettingX.asm $src/Settings/SettingType/SettingsType-GameSettingIndex.cpp $C_FLAGS
$CC -o $obj/Settings/type/RDBCpu.asm $src/Settings/SettingType/SettingsType-RDBCpuType.cpp $C_FLAGS
@ -110,7 +114,10 @@ $AS -o $obj/AppInit.o $obj/AppInit.asm
$AS -o $obj/logging.o $obj/logging.asm
$AS -o $obj/MemoryExceptionFilter.o $obj/MemoryExceptionFilter.asm
$AS -o $obj/Multilanguage/LangClass.o $obj/Multilanguage/LangClass.asm
$AS -o $obj/N64System/CheatClass.o $obj/N64System/CheatClass.asm
$AS -o $obj/N64System/enhan/Enhance.o $obj/N64System/enhan/Enhance.asm
$AS -o $obj/N64System/enhan/List.o $obj/N64System/enhan/List.asm
$AS -o $obj/N64System/enhan/File.o $obj/N64System/enhan/File.asm
$AS -o $obj/N64System/enhan/Enhans.o $obj/N64System/enhan/Enhans.asm
$AS -o $obj/N64System/EmuThread.o $obj/N64System/EmuThread.asm
$AS -o $obj/N64System/FPSClass.o $obj/N64System/FPSClass.asm
$AS -o $obj/N64System/interp/CPU.o $obj/N64System/interp/CPU.asm
@ -148,6 +155,7 @@ $AS -o $obj/N64System/dynarec/Ops.o $obj/N64System/dynarec/Ops.asm
$AS -o $obj/N64System/dynarec/Reg.o $obj/N64System/dynarec/Reg.asm
$AS -o $obj/N64System/dynarec/Sect.o $obj/N64System/dynarec/Sect.asm
$AS -o $obj/N64System/dynarec/log.o $obj/N64System/dynarec/log.asm
$AS -o $obj/N64System/dynarec/RegB.o $obj/N64System/dynarec/RegB.asm
$AS -o $obj/N64System/dynarec/x86op.o $obj/N64System/dynarec/x86op.asm
$AS -o $obj/N64System/SpeedLimiter.o $obj/N64System/SpeedLimiter.asm
$AS -o $obj/N64System/SystemGlobals.o $obj/N64System/SystemGlobals.asm
@ -163,11 +171,10 @@ $AS -o $obj/Settings/Game.o $obj/Settings/Game.asm
$AS -o $obj/Settings/Logging.o $obj/Settings/Logging.asm
$AS -o $obj/Settings/N64System.o $obj/Settings/N64System.asm
$AS -o $obj/Settings/Recompiler.o $obj/Settings/Recompiler.asm
$AS -o $obj/Settings/SettingsClass.o $obj/Settings/SettingsClass.asm
$AS -o $obj/Settings.o $obj/Settings.asm
$AS -o $obj/Settings/type/App.o $obj/Settings/type/App.asm
$AS -o $obj/Settings/type/AppIndex.o $obj/Settings/type/AppIndex.asm
$AS -o $obj/Settings/type/AppPath.o $obj/Settings/type/AppPath.asm
$AS -o $obj/Settings/type/Cheats.o $obj/Settings/type/Cheats.asm
$AS -o $obj/Settings/type/GSetting.o $obj/Settings/type/GSetting.asm
$AS -o $obj/Settings/type/GSettingX.o $obj/Settings/type/GSettingX.asm
$AS -o $obj/Settings/type/RDBCpu.o $obj/Settings/type/RDBCpu.asm
@ -190,7 +197,10 @@ $obj/AppInit.o \
$obj/logging.o \
$obj/MemoryExceptionFilter.o \
$obj/Multilanguage/LangClass.o \
$obj/N64System/CheatClass.o \
$obj/N64System/enhan/Enhance.o \
$obj/N64System/enhan/List.o \
$obj/N64System/enhan/File.o \
$obj/N64System/enhan/Enhans.o \
$obj/N64System/EmuThread.o \
$obj/N64System/FPSClass.o \
$obj/N64System/interp/CPU.o \
@ -228,6 +238,7 @@ $obj/N64System/dynarec/Ops.o \
$obj/N64System/dynarec/Reg.o \
$obj/N64System/dynarec/Sect.o \
$obj/N64System/dynarec/log.o \
$obj/N64System/dynarec/RegB.o \
$obj/N64System/dynarec/x86op.o \
$obj/N64System/SpeedLimiter.o \
$obj/N64System/SystemGlobals.o \
@ -243,11 +254,10 @@ $obj/Settings/Game.o \
$obj/Settings/Logging.o \
$obj/Settings/N64System.o \
$obj/Settings/Recompiler.o \
$obj/Settings/SettingsClass.o \
$obj/Settings.o \
$obj/Settings/type/App.o \
$obj/Settings/type/AppIndex.o \
$obj/Settings/type/AppPath.o \
$obj/Settings/type/Cheats.o \
$obj/Settings/type/GSetting.o \
$obj/Settings/type/GSettingX.o \
$obj/Settings/type/RDBCpu.o \

View File

@ -1,8 +1,8 @@
#include <stdlib.h>
#include <memory>
#include <Common\path.h>
#include <Common\FileClass.h>
#include <Common\StdString.h>
#include <Common/path.h>
#include <Common/FileClass.h>
#include <Common/StdString.h>
int main()
{

View File

@ -35,7 +35,7 @@
#include "PakIO.h"
#include "Version.h"
#include "XInputController.h"
#include <Common\StdString.h>
#include <Common/StdString.h>
// Prototypes //
BOOL CALLBACK ControllerTabProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );