mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
remove unneeded file. make sure you can't insert a GBA cart in DSi mode.
This commit is contained in:
@ -904,7 +904,8 @@ bool DoSavestate(Savestate* file)
|
|||||||
ARM7->DoSavestate(file);
|
ARM7->DoSavestate(file);
|
||||||
|
|
||||||
NDSCart::DoSavestate(file);
|
NDSCart::DoSavestate(file);
|
||||||
GBACart::DoSavestate(file);
|
if (ConsoleType == 0)
|
||||||
|
GBACart::DoSavestate(file);
|
||||||
GPU::DoSavestate(file);
|
GPU::DoSavestate(file);
|
||||||
SPU::DoSavestate(file);
|
SPU::DoSavestate(file);
|
||||||
SPI::DoSavestate(file);
|
SPI::DoSavestate(file);
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2016-2021 Arisotura
|
|
||||||
|
|
||||||
This file is part of melonDS.
|
|
||||||
|
|
||||||
melonDS is free software: you can redistribute it and/or modify it under
|
|
||||||
the terms of the GNU General Public License as published by the Free
|
|
||||||
Software Foundation, either version 3 of the License, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
|
||||||
with melonDS. If not, see http://www.gnu.org/licenses/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SHAREDCONFIG_H
|
|
||||||
#define SHAREDCONFIG_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace Config
|
|
||||||
{
|
|
||||||
|
|
||||||
extern int ConsoleType;
|
|
||||||
extern bool DirectBoot;
|
|
||||||
extern bool SavestateRelocSRAM;
|
|
||||||
|
|
||||||
extern bool ExternalBIOSEnable;
|
|
||||||
|
|
||||||
extern std::string BIOS9Path;
|
|
||||||
extern std::string BIOS7Path;
|
|
||||||
extern std::string FirmwarePath;
|
|
||||||
|
|
||||||
extern std::string DSiBIOS9Path;
|
|
||||||
extern std::string DSiBIOS7Path;
|
|
||||||
extern std::string DSiFirmwarePath;
|
|
||||||
extern std::string DSiNANDPath;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -35,7 +35,6 @@ SET(SOURCES_QT_SDL
|
|||||||
../Util_Audio.cpp
|
../Util_Audio.cpp
|
||||||
../FrontendUtil.h
|
../FrontendUtil.h
|
||||||
../mic_blow.h
|
../mic_blow.h
|
||||||
../SharedConfig.h
|
|
||||||
|
|
||||||
${CMAKE_SOURCE_DIR}/res/melon.qrc
|
${CMAKE_SOURCE_DIR}/res/melon.qrc
|
||||||
)
|
)
|
||||||
|
@ -408,6 +408,7 @@ ARCodeFile* GetCheatFile()
|
|||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
NDS::SetConsoleType(Config::ConsoleType);
|
NDS::SetConsoleType(Config::ConsoleType);
|
||||||
|
if (Config::ConsoleType == 1) EjectGBACart();
|
||||||
NDS::Reset();
|
NDS::Reset();
|
||||||
|
|
||||||
if (!BaseROMName.empty())
|
if (!BaseROMName.empty())
|
||||||
@ -596,6 +597,7 @@ QString CartLabel()
|
|||||||
|
|
||||||
bool LoadGBAROM(QStringList filepath)
|
bool LoadGBAROM(QStringList filepath)
|
||||||
{
|
{
|
||||||
|
if (Config::ConsoleType == 1) return false;
|
||||||
if (filepath.empty()) return false;
|
if (filepath.empty()) return false;
|
||||||
|
|
||||||
u8* filedata;
|
u8* filedata;
|
||||||
@ -700,6 +702,8 @@ bool LoadGBAROM(QStringList filepath)
|
|||||||
|
|
||||||
void LoadGBAAddon(int type)
|
void LoadGBAAddon(int type)
|
||||||
{
|
{
|
||||||
|
if (Config::ConsoleType == 1) return;
|
||||||
|
|
||||||
if (GBASave) delete GBASave;
|
if (GBASave) delete GBASave;
|
||||||
GBASave = nullptr;
|
GBASave = nullptr;
|
||||||
|
|
||||||
@ -731,10 +735,20 @@ bool GBACartInserted()
|
|||||||
|
|
||||||
QString GBACartLabel()
|
QString GBACartLabel()
|
||||||
{
|
{
|
||||||
|
if (Config::ConsoleType == 1) return "none (DSi)";
|
||||||
|
|
||||||
switch (GBACartType)
|
switch (GBACartType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return "it's a ROM (TODO)";
|
{
|
||||||
|
QString ret = QString::fromStdString(BaseGBAROMName);
|
||||||
|
|
||||||
|
int maxlen = 32;
|
||||||
|
if (ret.length() > maxlen)
|
||||||
|
ret = ret.left(maxlen-6) + "..." + ret.right(3);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
case NDS::GBAAddon_RAMExpansion:
|
case NDS::GBAAddon_RAMExpansion:
|
||||||
return "Memory expansion";
|
return "Memory expansion";
|
||||||
|
@ -1619,6 +1619,13 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
|||||||
actEjectCart->setEnabled(false);
|
actEjectCart->setEnabled(false);
|
||||||
actEjectGBACart->setEnabled(false);
|
actEjectGBACart->setEnabled(false);
|
||||||
|
|
||||||
|
if (Config::ConsoleType == 1)
|
||||||
|
{
|
||||||
|
actInsertGBACart->setEnabled(false);
|
||||||
|
for (int i = 0; i < 1; i++)
|
||||||
|
actInsertGBAAddon[i]->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 9; i++)
|
for (int i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
actSaveState[i]->setEnabled(false);
|
actSaveState[i]->setEnabled(false);
|
||||||
@ -2037,7 +2044,7 @@ void MainWindow::updateCartInserted(bool gba)
|
|||||||
bool inserted;
|
bool inserted;
|
||||||
if (gba)
|
if (gba)
|
||||||
{
|
{
|
||||||
inserted = ROMManager::GBACartInserted();
|
inserted = ROMManager::GBACartInserted() && (Config::ConsoleType == 0);
|
||||||
actCurrentGBACart->setText("GBA slot: " + ROMManager::GBACartLabel());
|
actCurrentGBACart->setText("GBA slot: " + ROMManager::GBACartLabel());
|
||||||
actEjectGBACart->setEnabled(inserted);
|
actEjectGBACart->setEnabled(inserted);
|
||||||
}
|
}
|
||||||
@ -2541,9 +2548,26 @@ void MainWindow::onEmuSettingsDialogFinished(int res)
|
|||||||
{
|
{
|
||||||
emuThread->emuUnpause();
|
emuThread->emuUnpause();
|
||||||
|
|
||||||
|
if (Config::ConsoleType == 1)
|
||||||
|
{
|
||||||
|
actInsertGBACart->setEnabled(false);
|
||||||
|
for (int i = 0; i < 1; i++)
|
||||||
|
actInsertGBAAddon[i]->setEnabled(false);
|
||||||
|
actEjectGBACart->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actInsertGBACart->setEnabled(true);
|
||||||
|
for (int i = 0; i < 1; i++)
|
||||||
|
actInsertGBAAddon[i]->setEnabled(true);
|
||||||
|
actEjectGBACart->setEnabled(ROMManager::GBACartInserted());
|
||||||
|
}
|
||||||
|
|
||||||
if (EmuSettingsDialog::needsReset)
|
if (EmuSettingsDialog::needsReset)
|
||||||
onReset();
|
onReset();
|
||||||
|
|
||||||
|
actCurrentGBACart->setText("GBA slot: " + ROMManager::GBACartLabel());
|
||||||
|
|
||||||
if (!RunningSomething)
|
if (!RunningSomething)
|
||||||
actTitleManager->setEnabled(!Config::DSiNANDPath.empty());
|
actTitleManager->setEnabled(!Config::DSiNANDPath.empty());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user