mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 05:40:15 -06:00
get the bulk of the RTC functionality going
This commit is contained in:
47
src/RTC.cpp
47
src/RTC.cpp
@ -20,7 +20,6 @@
|
|||||||
#define _POSIX_THREAD_SAFE_FUNCTIONS
|
#define _POSIX_THREAD_SAFE_FUNCTIONS
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
|
||||||
#include "NDS.h"
|
#include "NDS.h"
|
||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
@ -57,6 +56,13 @@ void WriteDateTime(int num, u8 val);
|
|||||||
|
|
||||||
bool Init()
|
bool Init()
|
||||||
{
|
{
|
||||||
|
State.MinuteCount = 0;
|
||||||
|
ResetState();
|
||||||
|
|
||||||
|
// indicate the power was off
|
||||||
|
// this will be changed if a previously saved RTC state is loaded
|
||||||
|
State.StatusReg1 = 0x80;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,13 +81,6 @@ void Reset()
|
|||||||
|
|
||||||
CurCmd = 0;
|
CurCmd = 0;
|
||||||
|
|
||||||
State.MinuteCount = 0;
|
|
||||||
ResetState();
|
|
||||||
|
|
||||||
// indicate the power was off
|
|
||||||
// this will be changed if a previously saved RTC state is loaded
|
|
||||||
State.StatusReg1 = 0x80;
|
|
||||||
|
|
||||||
ClockCount = 0;
|
ClockCount = 0;
|
||||||
ScheduleTimer(true);
|
ScheduleTimer(true);
|
||||||
}
|
}
|
||||||
@ -152,6 +151,38 @@ void SetState(StateData& state)
|
|||||||
WriteDateTime(i+1, State.DateTime[i]);
|
WriteDateTime(i+1, State.DateTime[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetDateTime(int& year, int& month, int& day, int& hour, int& minute, int& second)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
|
||||||
|
val = State.DateTime[0];
|
||||||
|
year = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
year += 2000;
|
||||||
|
|
||||||
|
val = State.DateTime[1] & 0x3F;
|
||||||
|
month = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
|
||||||
|
val = State.DateTime[2] & 0x3F;
|
||||||
|
day = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
|
||||||
|
val = State.DateTime[4] & 0x3F;
|
||||||
|
hour = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
|
||||||
|
if (!(State.StatusReg1 & (1<<1)))
|
||||||
|
{
|
||||||
|
// 12-hour mode
|
||||||
|
|
||||||
|
if (State.DateTime[4] & 0x40)
|
||||||
|
hour += 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
val = State.DateTime[5] & 0x7F;
|
||||||
|
minute = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
|
||||||
|
val = State.DateTime[6] & 0x7F;
|
||||||
|
second = (val & 0xF) + ((val >> 4) * 10);
|
||||||
|
}
|
||||||
|
|
||||||
void SetDateTime(int year, int month, int day, int hour, int minute, int second)
|
void SetDateTime(int year, int month, int day, int hour, int minute, int second)
|
||||||
{
|
{
|
||||||
int monthdays[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
int monthdays[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||||
|
@ -50,6 +50,7 @@ void DoSavestate(Savestate* file);
|
|||||||
|
|
||||||
void GetState(StateData& state);
|
void GetState(StateData& state);
|
||||||
void SetState(StateData& state);
|
void SetState(StateData& state);
|
||||||
|
void GetDateTime(int& year, int& month, int& day, int& hour, int& minute, int& second);
|
||||||
void SetDateTime(int year, int month, int day, int hour, int minute, int second);
|
void SetDateTime(int year, int month, int day, int hour, int minute, int second);
|
||||||
void ResetState();
|
void ResetState();
|
||||||
|
|
||||||
|
@ -140,6 +140,11 @@ int MouseHideSeconds;
|
|||||||
|
|
||||||
bool PauseLostFocus;
|
bool PauseLostFocus;
|
||||||
|
|
||||||
|
int RTCMode;
|
||||||
|
std::string RTCLastTime;
|
||||||
|
std::string RTCLastHostTime;
|
||||||
|
std::string RTCNewTime;
|
||||||
|
|
||||||
bool DSBatteryLevelOkay;
|
bool DSBatteryLevelOkay;
|
||||||
int DSiBatteryLevel;
|
int DSiBatteryLevel;
|
||||||
bool DSiBatteryCharging;
|
bool DSiBatteryCharging;
|
||||||
@ -339,6 +344,11 @@ ConfigEntry ConfigFile[] =
|
|||||||
{"MouseHideSeconds", 0, &MouseHideSeconds, 5, false},
|
{"MouseHideSeconds", 0, &MouseHideSeconds, 5, false},
|
||||||
{"PauseLostFocus", 1, &PauseLostFocus, false, false},
|
{"PauseLostFocus", 1, &PauseLostFocus, false, false},
|
||||||
|
|
||||||
|
{"RTCMode", 0, &RTCMode, 0, true},
|
||||||
|
{"RTCLastTime", 2, &RTCLastTime, (std::string)"", true},
|
||||||
|
{"RTCLastHostTime", 2, &RTCLastHostTime, (std::string)"", true},
|
||||||
|
{"RTCNewTime", 2, &RTCNewTime, (std::string)"", true},
|
||||||
|
|
||||||
{"DSBatteryLevelOkay", 1, &DSBatteryLevelOkay, true, true},
|
{"DSBatteryLevelOkay", 1, &DSBatteryLevelOkay, true, true},
|
||||||
{"DSiBatteryLevel", 0, &DSiBatteryLevel, 0xF, true},
|
{"DSiBatteryLevel", 0, &DSiBatteryLevel, 0xF, true},
|
||||||
{"DSiBatteryCharging", 1, &DSiBatteryCharging, true, true},
|
{"DSiBatteryCharging", 1, &DSiBatteryCharging, true, true},
|
||||||
|
@ -185,6 +185,11 @@ extern bool MouseHide;
|
|||||||
extern int MouseHideSeconds;
|
extern int MouseHideSeconds;
|
||||||
extern bool PauseLostFocus;
|
extern bool PauseLostFocus;
|
||||||
|
|
||||||
|
extern int RTCMode;
|
||||||
|
extern std::string RTCLastTime;
|
||||||
|
extern std::string RTCLastHostTime;
|
||||||
|
extern std::string RTCNewTime;
|
||||||
|
|
||||||
extern bool DSBatteryLevelOkay;
|
extern bool DSBatteryLevelOkay;
|
||||||
extern int DSiBatteryLevel;
|
extern int DSiBatteryLevel;
|
||||||
extern bool DSiBatteryCharging;
|
extern bool DSiBatteryCharging;
|
||||||
|
@ -32,7 +32,46 @@ DateTimeDialog::DateTimeDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Da
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
//
|
grpTimeMode = new QButtonGroup(this);
|
||||||
|
grpTimeMode->addButton(ui->rbSystemTime, 0);
|
||||||
|
grpTimeMode->addButton(ui->rbCustomTime, 1);
|
||||||
|
connect(grpTimeMode, SIGNAL(buttonClicked(int)), this, SLOT(onChangeTimeMode(int)));
|
||||||
|
grpTimeMode->button(Config::RTCMode)->setChecked(true);
|
||||||
|
|
||||||
|
QDateTime now = QDateTime::currentDateTime();
|
||||||
|
customTime = now;
|
||||||
|
|
||||||
|
ui->chkChangeTime->setChecked(false);
|
||||||
|
|
||||||
|
if (Config::RTCNewTime != "")
|
||||||
|
{
|
||||||
|
QDateTime newtime = QDateTime::fromString(QString::fromStdString(Config::RTCNewTime), Qt::ISODate);
|
||||||
|
|
||||||
|
if (newtime.isValid())
|
||||||
|
{
|
||||||
|
ui->chkChangeTime->setChecked(true);
|
||||||
|
ui->txtNewCustomTime->setDateTime(newtime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config::RTCLastTime != "" && Config::RTCLastHostTime != "")
|
||||||
|
{
|
||||||
|
QDateTime lasttime = QDateTime::fromString(QString::fromStdString(Config::RTCLastTime), Qt::ISODate);
|
||||||
|
QDateTime lasthost = QDateTime::fromString(QString::fromStdString(Config::RTCLastHostTime), Qt::ISODate);
|
||||||
|
|
||||||
|
if (lasttime.isValid() && lasthost.isValid())
|
||||||
|
{
|
||||||
|
qint64 offset = lasthost.secsTo(now);
|
||||||
|
customTime = lasttime.addSecs(offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->lblCustomTime->setText(customTime.toString(ui->txtNewCustomTime->displayFormat()));
|
||||||
|
startTimer(1000);
|
||||||
|
|
||||||
|
bool iscustom = (Config::RTCMode == 1);
|
||||||
|
ui->chkChangeTime->setEnabled(iscustom);
|
||||||
|
ui->txtNewCustomTime->setEnabled(iscustom && ui->chkChangeTime->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTimeDialog::~DateTimeDialog()
|
DateTimeDialog::~DateTimeDialog()
|
||||||
@ -40,12 +79,48 @@ DateTimeDialog::~DateTimeDialog()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DateTimeDialog::timerEvent(QTimerEvent* event)
|
||||||
|
{
|
||||||
|
customTime = customTime.addSecs(1);
|
||||||
|
ui->lblCustomTime->setText(customTime.toString(ui->txtNewCustomTime->displayFormat()));
|
||||||
|
}
|
||||||
|
|
||||||
void DateTimeDialog::done(int r)
|
void DateTimeDialog::done(int r)
|
||||||
{
|
{
|
||||||
|
if (r == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
Config::RTCMode = grpTimeMode->checkedId();
|
||||||
|
|
||||||
|
if (ui->chkChangeTime->isChecked())
|
||||||
|
Config::RTCNewTime = ui->txtNewCustomTime->dateTime().toString(Qt::ISODate).toStdString();
|
||||||
|
else
|
||||||
|
Config::RTCNewTime = "";
|
||||||
|
|
||||||
|
Config::Save();
|
||||||
|
}
|
||||||
|
|
||||||
QDialog::done(r);
|
QDialog::done(r);
|
||||||
|
|
||||||
closeDlg();
|
closeDlg();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
void DateTimeDialog::on_chkChangeTime_clicked(bool checked)
|
||||||
|
{
|
||||||
|
bool iscustom = (grpTimeMode->checkedId() == 1);
|
||||||
|
|
||||||
|
ui->txtNewCustomTime->setEnabled(iscustom && checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DateTimeDialog::onChangeTimeMode(int mode)
|
||||||
|
{
|
||||||
|
bool iscustom = (mode == 1);
|
||||||
|
|
||||||
|
ui->chkChangeTime->setEnabled(iscustom);
|
||||||
|
ui->txtNewCustomTime->setEnabled(iscustom && ui->chkChangeTime->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCustomTimeLabel()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#define DATETIMEDIALOG_H
|
#define DATETIMEDIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
namespace Ui {class DateTimeDialog; }
|
namespace Ui {class DateTimeDialog; }
|
||||||
class DateTimeDialog;
|
class DateTimeDialog;
|
||||||
@ -50,15 +52,21 @@ public:
|
|||||||
currentDlg = nullptr;
|
currentDlg = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void timerEvent(QTimerEvent* event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void done(int r);
|
void done(int r);
|
||||||
|
|
||||||
// slots here
|
void on_chkChangeTime_clicked(bool checked);
|
||||||
|
void onChangeTimeMode(int mode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DateTimeDialog* ui;
|
Ui::DateTimeDialog* ui;
|
||||||
|
|
||||||
//
|
QButtonGroup* grpTimeMode;
|
||||||
|
|
||||||
|
QDateTime customTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DATETIMEDIALOG_H
|
#endif // DATETIMEDIALOG_H
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="cbChangeTime">
|
<widget class="QCheckBox" name="chkChangeTime">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Change</string>
|
<string>Change</string>
|
||||||
</property>
|
</property>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QDateTimeEdit" name="txtNewCustomDate">
|
<widget class="QDateTimeEdit" name="txtNewCustomTime">
|
||||||
<property name="dateTime">
|
<property name="dateTime">
|
||||||
<datetime>
|
<datetime>
|
||||||
<hour>0</hour>
|
<hour>0</hour>
|
||||||
@ -117,6 +117,9 @@
|
|||||||
<day>1</day>
|
<day>1</day>
|
||||||
</datetime>
|
</datetime>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="displayFormat">
|
||||||
|
<string>dd/MM/yyyy HH:mm:ss</string>
|
||||||
|
</property>
|
||||||
<property name="calendarPopup">
|
<property name="calendarPopup">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
#include <zstd.h>
|
#include <zstd.h>
|
||||||
#ifdef ARCHIVE_SUPPORT_ENABLED
|
#ifdef ARCHIVE_SUPPORT_ENABLED
|
||||||
#include "ArchiveUtil.h"
|
#include "ArchiveUtil.h"
|
||||||
@ -39,6 +41,7 @@
|
|||||||
#include "NDS.h"
|
#include "NDS.h"
|
||||||
#include "DSi.h"
|
#include "DSi.h"
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
|
#include "RTC.h"
|
||||||
#include "DSi_I2C.h"
|
#include "DSi_I2C.h"
|
||||||
#include "FreeBIOS.h"
|
#include "FreeBIOS.h"
|
||||||
|
|
||||||
@ -589,6 +592,54 @@ void SetBatteryLevels()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetDateTime()
|
||||||
|
{
|
||||||
|
QDateTime hosttime = QDateTime::currentDateTime();
|
||||||
|
QDateTime time;
|
||||||
|
|
||||||
|
if (Config::RTCMode == 0)
|
||||||
|
{
|
||||||
|
// use current system time
|
||||||
|
|
||||||
|
time = hosttime;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// use custom time
|
||||||
|
|
||||||
|
if (Config::RTCNewTime != "")
|
||||||
|
{
|
||||||
|
// assign a new custom time
|
||||||
|
|
||||||
|
time = QDateTime::fromString(QString::fromStdString(Config::RTCNewTime), Qt::ISODate);
|
||||||
|
if (!time.isValid())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (Config::RTCLastTime != "" && Config::RTCLastHostTime != "")
|
||||||
|
{
|
||||||
|
// deduce the custom time based on the last saved times
|
||||||
|
|
||||||
|
QDateTime lasttime = QDateTime::fromString(QString::fromStdString(Config::RTCLastTime), Qt::ISODate);
|
||||||
|
QDateTime lasthost = QDateTime::fromString(QString::fromStdString(Config::RTCLastHostTime), Qt::ISODate);
|
||||||
|
|
||||||
|
if (lasttime.isValid() && lasthost.isValid())
|
||||||
|
{
|
||||||
|
qint64 offset = lasthost.secsTo(hosttime);
|
||||||
|
time = lasttime.addSecs(offset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RTC::SetDateTime(time.date().year(), time.date().month(), time.date().day(),
|
||||||
|
time.time().hour(), time.time().minute(), time.time().second());
|
||||||
|
|
||||||
|
Config::RTCLastTime = time.toString(Qt::ISODate).toStdString();
|
||||||
|
Config::RTCLastHostTime = hosttime.toString(Qt::ISODate).toStdString();
|
||||||
|
Config::RTCNewTime = "";
|
||||||
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
NDS::SetConsoleType(Config::ConsoleType);
|
NDS::SetConsoleType(Config::ConsoleType);
|
||||||
@ -602,6 +653,7 @@ void Reset()
|
|||||||
}
|
}
|
||||||
NDS::Reset();
|
NDS::Reset();
|
||||||
SetBatteryLevels();
|
SetBatteryLevels();
|
||||||
|
SetDateTime();
|
||||||
|
|
||||||
if ((CartType != -1) && NDSSave)
|
if ((CartType != -1) && NDSSave)
|
||||||
{
|
{
|
||||||
@ -678,6 +730,7 @@ bool LoadBIOS()
|
|||||||
|
|
||||||
NDS::Reset();
|
NDS::Reset();
|
||||||
SetBatteryLevels();
|
SetBatteryLevels();
|
||||||
|
SetDateTime();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1204,6 +1257,7 @@ bool LoadROM(QStringList filepath, bool reset)
|
|||||||
|
|
||||||
NDS::Reset();
|
NDS::Reset();
|
||||||
SetBatteryLevels();
|
SetBatteryLevels();
|
||||||
|
SetDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 savelen = 0;
|
u32 savelen = 0;
|
||||||
|
@ -91,6 +91,7 @@
|
|||||||
#include "LocalMP.h"
|
#include "LocalMP.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "DSi_I2C.h"
|
#include "DSi_I2C.h"
|
||||||
|
#include "RTC.h"
|
||||||
|
|
||||||
#include "Savestate.h"
|
#include "Savestate.h"
|
||||||
|
|
||||||
@ -314,6 +315,8 @@ void EmuThread::deinitOpenGL()
|
|||||||
void EmuThread::run()
|
void EmuThread::run()
|
||||||
{
|
{
|
||||||
u32 mainScreenPos[3];
|
u32 mainScreenPos[3];
|
||||||
|
Platform::FileHandle* file;
|
||||||
|
bool hasrun = false;
|
||||||
|
|
||||||
NDS::Init();
|
NDS::Init();
|
||||||
|
|
||||||
@ -353,6 +356,15 @@ void EmuThread::run()
|
|||||||
u32 winUpdateCount = 0, winUpdateFreq = 1;
|
u32 winUpdateCount = 0, winUpdateFreq = 1;
|
||||||
u8 dsiVolumeLevel = 0x1F;
|
u8 dsiVolumeLevel = 0x1F;
|
||||||
|
|
||||||
|
file = Platform::OpenLocalFile("rtc.bin", Platform::FileMode::Read);
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
RTC::StateData state;
|
||||||
|
Platform::FileRead(&state, sizeof(state), 1, file);
|
||||||
|
Platform::CloseFile(file);
|
||||||
|
RTC::SetState(state);
|
||||||
|
}
|
||||||
|
|
||||||
char melontitle[100];
|
char melontitle[100];
|
||||||
|
|
||||||
while (EmuRunning != emuStatus_Exit)
|
while (EmuRunning != emuStatus_Exit)
|
||||||
@ -429,6 +441,8 @@ void EmuThread::run()
|
|||||||
|
|
||||||
if (EmuRunning == emuStatus_Running || EmuRunning == emuStatus_FrameStep)
|
if (EmuRunning == emuStatus_Running || EmuRunning == emuStatus_FrameStep)
|
||||||
{
|
{
|
||||||
|
hasrun = true;
|
||||||
|
|
||||||
EmuStatus = emuStatus_Running;
|
EmuStatus = emuStatus_Running;
|
||||||
if (EmuRunning == emuStatus_FrameStep) EmuRunning = emuStatus_Paused;
|
if (EmuRunning == emuStatus_FrameStep) EmuRunning = emuStatus_Paused;
|
||||||
|
|
||||||
@ -651,6 +665,26 @@ void EmuThread::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file = Platform::OpenLocalFile("rtc.bin", Platform::FileMode::Write);
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
RTC::StateData state;
|
||||||
|
RTC::GetState(state);
|
||||||
|
Platform::FileWrite(&state, sizeof(state), 1, file);
|
||||||
|
Platform::CloseFile(file);
|
||||||
|
}
|
||||||
|
if (hasrun)
|
||||||
|
{
|
||||||
|
int y, m, d, h, i, s;
|
||||||
|
RTC::GetDateTime(y, m, d, h, i, s);
|
||||||
|
|
||||||
|
QDateTime hosttime = QDateTime::currentDateTime();
|
||||||
|
QDateTime time = QDateTime(QDate(y, m, d), QTime(h, i, s));
|
||||||
|
|
||||||
|
Config::RTCLastTime = time.toString(Qt::ISODate).toStdString();
|
||||||
|
Config::RTCLastHostTime = hosttime.toString(Qt::ISODate).toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
EmuStatus = emuStatus_Exit;
|
EmuStatus = emuStatus_Exit;
|
||||||
|
|
||||||
GPU::DeInitRenderer();
|
GPU::DeInitRenderer();
|
||||||
@ -3305,6 +3339,7 @@ int main(int argc, char** argv)
|
|||||||
SANITIZE(Config::ScreenSizing, 0, (int)Frontend::screenSizing_MAX);
|
SANITIZE(Config::ScreenSizing, 0, (int)Frontend::screenSizing_MAX);
|
||||||
SANITIZE(Config::ScreenAspectTop, 0, AspectRatiosNum);
|
SANITIZE(Config::ScreenAspectTop, 0, AspectRatiosNum);
|
||||||
SANITIZE(Config::ScreenAspectBot, 0, AspectRatiosNum);
|
SANITIZE(Config::ScreenAspectBot, 0, AspectRatiosNum);
|
||||||
|
SANITIZE(Config::RTCMode, 0, 1);
|
||||||
#undef SANITIZE
|
#undef SANITIZE
|
||||||
|
|
||||||
AudioInOut::Init();
|
AudioInOut::Init();
|
||||||
|
Reference in New Issue
Block a user