fix #3165 and fix the tabbing/space mixup here
This commit is contained in:
parent
6cb44e0e8d
commit
4bac1bbf1b
Binary file not shown.
|
@ -12,8 +12,8 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "frontend/mic_blow.h"
|
#include "frontend/mic_blow.h"
|
||||||
|
|
||||||
#include "../emulibc/emulibc.h"
|
#include "emulibc.h"
|
||||||
#include "../emulibc/waterboxcore.h"
|
#include "waterboxcore.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -74,7 +74,7 @@ extern std::stringstream* NANDFilePtr;
|
||||||
static bool LoadDSiWare(u8* TmdData)
|
static bool LoadDSiWare(u8* TmdData)
|
||||||
{
|
{
|
||||||
FILE* bios7i = Platform::OpenLocalFile(Config::DSiBIOS7Path, "rb");
|
FILE* bios7i = Platform::OpenLocalFile(Config::DSiBIOS7Path, "rb");
|
||||||
if (!bios7i)
|
if (!reinterpret_cast<void*>(bios7i))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
u8 es_keyY[16];
|
u8 es_keyY[16];
|
||||||
|
@ -101,7 +101,7 @@ EXPORT bool Init(LoadFlags flags, LoadData* loadData, FirmwareSettings* fwSettin
|
||||||
Config::AudioBitrate = !!(flags & ACCURATE_AUDIO_BITRATE) ? 1 : 2;
|
Config::AudioBitrate = !!(flags & ACCURATE_AUDIO_BITRATE) ? 1 : 2;
|
||||||
Config::FirmwareOverrideSettings = !!(flags & FIRMWARE_OVERRIDE);
|
Config::FirmwareOverrideSettings = !!(flags & FIRMWARE_OVERRIDE);
|
||||||
biz_skip_fw = !!(flags & SKIP_FIRMWARE);
|
biz_skip_fw = !!(flags & SKIP_FIRMWARE);
|
||||||
bool isDsi = !!(flags & IS_DSI);
|
bool isDsi = !!(flags & IS_DSI);
|
||||||
|
|
||||||
NDS::SetConsoleType(isDsi);
|
NDS::SetConsoleType(isDsi);
|
||||||
// time calls are deterministic under wbx, so this will force the mac address to a constant value instead of relying on whatever is in the firmware
|
// time calls are deterministic under wbx, so this will force the mac address to a constant value instead of relying on whatever is in the firmware
|
||||||
|
@ -164,7 +164,7 @@ EXPORT void PutSaveRam(u8* data, u32 len)
|
||||||
|
|
||||||
EXPORT void GetSaveRam(u8* data)
|
EXPORT void GetSaveRam(u8* data)
|
||||||
{
|
{
|
||||||
if (NDSCart::Cart) NDSCart::Cart->GetSaveData(data);
|
if (NDSCart::Cart) NDSCart::Cart->GetSaveData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT s32 GetSaveRamLength()
|
EXPORT s32 GetSaveRamLength()
|
||||||
|
@ -357,7 +357,7 @@ static bool RunningFrame = false;
|
||||||
|
|
||||||
EXPORT void FrameAdvance(MyFrameInfo* f)
|
EXPORT void FrameAdvance(MyFrameInfo* f)
|
||||||
{
|
{
|
||||||
RunningFrame = true;
|
RunningFrame = true;
|
||||||
|
|
||||||
if (f->Keys & 0x8000)
|
if (f->Keys & 0x8000)
|
||||||
{
|
{
|
||||||
|
@ -413,7 +413,7 @@ EXPORT void FrameAdvance(MyFrameInfo* f)
|
||||||
f->Cycles = NDS::GetSysClockCycles(2);
|
f->Cycles = NDS::GetSysClockCycles(2);
|
||||||
f->Lagged = NDS::LagFrameFlag;
|
f->Lagged = NDS::LagFrameFlag;
|
||||||
|
|
||||||
RunningFrame = false;
|
RunningFrame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*InputCallback)();
|
void (*InputCallback)();
|
||||||
|
@ -435,7 +435,7 @@ EXPORT void SetReg(s32 ncpu, s32 index, s32 val)
|
||||||
|
|
||||||
EXPORT u32 GetCallbackCycleOffset()
|
EXPORT u32 GetCallbackCycleOffset()
|
||||||
{
|
{
|
||||||
return RunningFrame ? NDS::GetSysClockCycles(2) : 0;
|
return RunningFrame ? NDS::GetSysClockCycles(2) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*ReadCallback)(u32);
|
void (*ReadCallback)(u32);
|
||||||
|
|
|
@ -46,9 +46,7 @@ int GetConfigInt(ConfigEntry entry)
|
||||||
|
|
||||||
case AudioBitrate: return Config::AudioBitrate;
|
case AudioBitrate: return Config::AudioBitrate;
|
||||||
|
|
||||||
case TimeAtBoot: return Config::TimeAtBoot;
|
case TimeAtBoot: return Config::TimeAtBoot;
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -78,10 +76,8 @@ bool GetConfigBool(ConfigEntry entry)
|
||||||
case Firm_RandomizeMAC: return Config::RandomizeMAC != 0;
|
case Firm_RandomizeMAC: return Config::RandomizeMAC != 0;
|
||||||
case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0;
|
case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0;
|
||||||
|
|
||||||
case UseRealTime: return Config::UseRealTime != 0;
|
case UseRealTime: return Config::UseRealTime != 0;
|
||||||
case FixedBootTime: return Config::FixedBootTime != 0;
|
case FixedBootTime: return Config::FixedBootTime != 0;
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -108,8 +104,6 @@ std::string GetConfigString(ConfigEntry entry)
|
||||||
|
|
||||||
case Firm_Username: return Config::FirmwareUsername;
|
case Firm_Username: return Config::FirmwareUsername;
|
||||||
case Firm_Message: return Config::FirmwareMessage;
|
case Firm_Message: return Config::FirmwareMessage;
|
||||||
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
@ -147,7 +141,6 @@ bool GetConfigArray(ConfigEntry entry, void* data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -156,14 +149,14 @@ bool GetConfigArray(ConfigEntry entry, void* data)
|
||||||
|
|
||||||
FILE* OpenFile(std::string path, std::string mode, bool mustexist)
|
FILE* OpenFile(std::string path, std::string mode, bool mustexist)
|
||||||
{
|
{
|
||||||
if (path == Config::DSiNANDPath) return reinterpret_cast<FILE*>(NANDFilePtr);
|
if (path == Config::DSiNANDPath) return reinterpret_cast<FILE*>(NANDFilePtr);
|
||||||
|
|
||||||
return fopen(path.c_str(), mode.c_str());
|
return fopen(path.c_str(), mode.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE* OpenLocalFile(std::string path, std::string mode)
|
FILE* OpenLocalFile(std::string path, std::string mode)
|
||||||
{
|
{
|
||||||
if (path == Config::DSiNANDPath) return reinterpret_cast<FILE*>(NANDFilePtr);
|
if (path == Config::DSiNANDPath) return reinterpret_cast<FILE*>(NANDFilePtr);
|
||||||
|
|
||||||
return fopen(path.c_str(), mode.c_str());
|
return fopen(path.c_str(), mode.c_str());
|
||||||
}
|
}
|
||||||
|
@ -181,7 +174,7 @@ void Thread_Free(Thread* thread)
|
||||||
|
|
||||||
void Thread_Wait(Thread* thread)
|
void Thread_Wait(Thread* thread)
|
||||||
{
|
{
|
||||||
((std::thread*) thread)->join();
|
((std::thread*) thread)->join();
|
||||||
}
|
}
|
||||||
|
|
||||||
Semaphore* Semaphore_Create()
|
Semaphore* Semaphore_Create()
|
||||||
|
@ -241,7 +234,7 @@ bool Mutex_TryLock(Mutex* mutex)
|
||||||
|
|
||||||
void WriteNDSSave(const u8* savedata, u32 savelen, u32 writeoffset, u32 writelen)
|
void WriteNDSSave(const u8* savedata, u32 savelen, u32 writeoffset, u32 writelen)
|
||||||
{
|
{
|
||||||
bool NdsSaveRamIsDirty = true;
|
NdsSaveRamIsDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteGBASave(const u8* savedata, u32 savelen, u32 writeoffset, u32 writelen)
|
void WriteGBASave(const u8* savedata, u32 savelen, u32 writeoffset, u32 writelen)
|
||||||
|
|
Loading…
Reference in New Issue