mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 05:10:00 +00:00
Fix Windows build and premake
This commit is contained in:
parent
8a4fa58cd4
commit
36e2bc95d3
|
@ -90,7 +90,8 @@ workspace "re3"
|
|||
}
|
||||
debugdir (gamepath)
|
||||
if (exepath) then
|
||||
debugcommand (gamepath .. exepath)
|
||||
-- Used VS variable $(TargetFileName) because it doesn't accept premake tokens. Does debugcommand even work outside VS??
|
||||
debugcommand (gamepath .. "$(TargetFileName)")
|
||||
dir, file = exepath:match'(.*/)(.*)'
|
||||
debugdir (gamepath .. (dir or ""))
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#include "crossplatform.h"
|
||||
#include "main.h"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#include "crossplatform.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include "common.h"
|
||||
#include "crossplatform.h"
|
||||
|
||||
// Codes compatible with Windows and Linux
|
||||
#ifndef _WIN32
|
||||
|
||||
// For internal use
|
||||
// wMilliseconds is not needed
|
||||
void tmToSystemTime(const tm *tm, SYSTEMTIME *out) {
|
||||
|
@ -18,6 +21,7 @@ void GetLocalTime_CP(SYSTEMTIME *out) {
|
|||
tm *localTm = localtime(×tamp);
|
||||
tmToSystemTime(localTm, out);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Compatible with Linux/POSIX and MinGW on Windows
|
||||
#ifndef _WIN32
|
||||
|
@ -80,6 +84,7 @@ void FileTimeToSystemTime(time_t* writeTime, SYSTEMTIME* out) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Funcs/features from Windows that we need on other platforms
|
||||
#ifndef _WIN32
|
||||
char *strupr(char *s) {
|
||||
char* tmp = s;
|
||||
|
|
|
@ -82,7 +82,7 @@ RwBool IsForegroundApp();
|
|||
#endif
|
||||
|
||||
// Codes compatible with Windows and Linux
|
||||
#if !defined _WIN32
|
||||
#ifndef _WIN32
|
||||
#define DeleteFile unlink
|
||||
|
||||
// Needed for save games
|
||||
|
@ -103,7 +103,7 @@ void GetLocalTime_CP(SYSTEMTIME* out);
|
|||
#endif
|
||||
|
||||
// Compatible with Linux/POSIX and MinGW on Windows
|
||||
#if !defined _WIN32
|
||||
#ifndef _WIN32
|
||||
#include <iostream>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -66,7 +66,7 @@ static psGlobalType PsGlobal;
|
|||
#define JIF(x) if (FAILED(hr=(x))) \
|
||||
{debug(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr); return;}
|
||||
|
||||
long _dwMemAvailPhys;
|
||||
unsigned long _dwMemAvailPhys;
|
||||
RwUInt32 gGameState;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -100,10 +100,10 @@ IVideoWindow *pVW = nil;
|
|||
IMediaSeeking *pMS = nil;
|
||||
|
||||
DWORD dwDXVersion;
|
||||
DWORD _dwMemTotalPhys;
|
||||
DWORD _dwMemAvailPhys;
|
||||
DWORD _dwMemTotalVirtual;
|
||||
DWORD _dwMemAvailVirtual;
|
||||
SIZE_T _dwMemTotalPhys;
|
||||
SIZE_T _dwMemAvailPhys;
|
||||
SIZE_T _dwMemTotalVirtual;
|
||||
SIZE_T _dwMemAvailVirtual;
|
||||
DWORD _dwMemTotalVideo;
|
||||
DWORD _dwMemAvailVideo;
|
||||
DWORD _dwOperatingSystemVersion;
|
||||
|
@ -687,10 +687,10 @@ psInitialise(void)
|
|||
|
||||
_GetVideoMemInfo(&_dwMemTotalVideo, &_dwMemAvailVideo);
|
||||
#ifdef FIX_BUGS
|
||||
debug("Physical memory size %u\n", _dwMemTotalPhys);
|
||||
debug("Available physical memory %u\n", _dwMemAvailPhys);
|
||||
debug("Video memory size %u\n", _dwMemTotalVideo);
|
||||
debug("Available video memory %u\n", _dwMemAvailVideo);
|
||||
debug("Physical memory size %lu\n", _dwMemTotalPhys);
|
||||
debug("Available physical memory %lu\n", _dwMemAvailPhys);
|
||||
debug("Video memory size %lu\n", _dwMemTotalVideo);
|
||||
debug("Available video memory %lu\n", _dwMemAvailVideo);
|
||||
#else
|
||||
debug("Physical memory size %d\n", _dwMemTotalPhys);
|
||||
debug("Available physical memory %d\n", _dwMemAvailPhys);
|
||||
|
|
Loading…
Reference in a new issue