remove eject from win32 menu items and make card eject IRQ fire whenever slot-1 devices change. a note to this effect is in the slot 1 config dialog. this means we no longer reset when the slot-1 device changes. why did we need to do that, anyway? was it copied from the slot-2 config? why do we need to do that for slot-2?
rationale: i think some users were picking this menu item on accident and scrambling their games, and we had needed to do this eventually anyway as part of logicalization of systems
This commit is contained in:
parent
1f6181db81
commit
8ef50bfa7c
|
@ -944,14 +944,10 @@ int NDS_WriteBMP_32bppBuffer(int width, int height, const void* buf, const char
|
|||
}
|
||||
|
||||
void NDS_Sleep() { nds.sleeping = TRUE; }
|
||||
void NDS_ToggleCardEject()
|
||||
|
||||
void NDS_TriggerCardEjectIRQ()
|
||||
{
|
||||
if(!nds.cardEjected)
|
||||
{
|
||||
//staff of kings will test this (it also uses the arm9 0xB8 poll)
|
||||
NDS_makeIrq(ARMCPU_ARM7, IRQ_BIT_GC_IREQ_MC);
|
||||
}
|
||||
nds.cardEjected ^= TRUE;
|
||||
NDS_makeIrq(ARMCPU_ARM7, IRQ_BIT_GC_IREQ_MC);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -456,7 +456,7 @@ bool nds_loadstate(EMUFILE* is, int size);
|
|||
int NDS_WriteBMP(const char *filename);
|
||||
|
||||
void NDS_Sleep();
|
||||
void NDS_ToggleCardEject();
|
||||
void NDS_TriggerCardEjectIRQ();
|
||||
|
||||
void NDS_SkipNextFrame();
|
||||
#define NDS_SkipFrame(s) if(s) NDS_SkipNext2DFrame();
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
/* Copyright (C) 2010-2011 DeSmuME team
|
||||
/*
|
||||
Copyright (C) 2010-2012 DeSmuME team
|
||||
|
||||
This file is part of DeSmuME
|
||||
This file 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
DeSmuME 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This file 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.
|
||||
|
||||
DeSmuME 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 DeSmuME; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../slot1.h"
|
||||
|
||||
static void slot1_info(char *info) { strcpy(info, "Slot1 no-card emulation (card ejected!)"); }
|
||||
static void slot1_info(char *info) { strcpy(info, "Slot1 no-card emulation"); }
|
||||
static void slot1_config(void) {}
|
||||
|
||||
static BOOL slot1_init() { return (TRUE); }
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//MUST SAVE ADDONS! OMG HOW DID WE FORGET THAT
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2010-2011 DeSmuME team
|
||||
Copyright (C) 2010-2012 DeSmuME team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "types.h"
|
||||
#include "slot1.h"
|
||||
|
||||
#include "NDSSystem.h"
|
||||
#include "emufile.h"
|
||||
#include "utils/vfat.h"
|
||||
|
||||
|
@ -84,6 +85,7 @@ void slot1Reset()
|
|||
|
||||
BOOL slot1Change(NDS_SLOT1_TYPE changeToType)
|
||||
{
|
||||
if(changeToType == slot1_device_type) return FALSE; //nothing to do
|
||||
if (changeToType > NDS_SLOT1_COUNT || changeToType < 0) return FALSE;
|
||||
slot1_device.close();
|
||||
slot1_device_type = changeToType;
|
||||
|
@ -91,6 +93,8 @@ BOOL slot1Change(NDS_SLOT1_TYPE changeToType)
|
|||
if (changeToType == NDS_SLOT1_R4)
|
||||
scanDir();
|
||||
printf("Slot 1: %s\n", slot1_device.name);
|
||||
printf("sending eject signal to SLOT-1\n");
|
||||
NDS_TriggerCardEjectIRQ();
|
||||
return slot1_device.init();
|
||||
}
|
||||
|
||||
|
|
|
@ -3993,7 +3993,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
DesEnableMenuItem(mainMenu, IDM_QUICK_PRINTSCREEN, romloaded);
|
||||
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDAVI, romloaded);
|
||||
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDWAV, romloaded);
|
||||
DesEnableMenuItem(mainMenu, IDM_EJECTCARD, romloaded && movieMode == MOVIEMODE_INACTIVE);
|
||||
DesEnableMenuItem(mainMenu, IDM_RESET, romloaded && !(movieMode == MOVIEMODE_PLAY && movie_readonly));
|
||||
DesEnableMenuItem(mainMenu, IDM_CLOSEROM, romloaded);
|
||||
DesEnableMenuItem(mainMenu, IDM_SHUT_UP, romloaded);
|
||||
|
@ -4032,7 +4031,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
|
||||
//emulation menu
|
||||
MainWindow->checkMenu(IDM_PAUSE, ((paused)));
|
||||
MainWindow->checkMenu(IDM_EJECTCARD, nds.cardEjected != FALSE);
|
||||
|
||||
// LCDs layout
|
||||
MainWindow->checkMenu(ID_LCDS_VERTICAL, ((video.layout==0)));
|
||||
|
@ -5350,10 +5348,6 @@ DOKEYDOWN:
|
|||
}
|
||||
break;
|
||||
|
||||
case IDM_EJECTCARD:
|
||||
NDS_ToggleCardEject();
|
||||
return 0;
|
||||
|
||||
case IDM_RESET:
|
||||
ResetGame();
|
||||
return 0;
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#define IDM_SBG1 125
|
||||
#define IDD_IMPORT_SAVE_SIZE 125
|
||||
#define IDM_SBG2 126
|
||||
#define IDD_SLOT1CONFIG 126
|
||||
#define IDM_SBG3 127
|
||||
#define IDM_OAM 128
|
||||
#define IDM_PRINTSCREEN 129
|
||||
|
@ -383,6 +384,7 @@
|
|||
#define IDC_PIANO_CS 1034
|
||||
#define IDC_BBROWSE 1035
|
||||
#define IDC_PIANO_D 1035
|
||||
#define IDC_ADDONS_INFO2 1035
|
||||
#define IDC_PATHIMG 1036
|
||||
#define IDC_PIANO_DS 1036
|
||||
#define IDC_PATH 1037
|
||||
|
@ -872,7 +874,6 @@
|
|||
#define ID_RAMSEARCH_CAPTIONTEXT 40064
|
||||
#define IDM_VIEW3D 40065
|
||||
#define IDM_LOCKDOWN 40066
|
||||
#define IDM_EJECTCARD 40068
|
||||
#define IDM_SHOWTOOLBAR 40069
|
||||
#define ID_CONFIG_DISPLAYMETHOD 40070
|
||||
#define ID_DISPLAYMETHOD_DIRECTDRAWHW 40071
|
||||
|
@ -1004,7 +1005,7 @@
|
|||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 125
|
||||
#define _APS_NEXT_RESOURCE_VALUE 127
|
||||
#define _APS_NEXT_COMMAND_VALUE 40102
|
||||
#define _APS_NEXT_CONTROL_VALUE 1053
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2011 DeSmuME team
|
||||
Copyright (C) 2011-2012 DeSmuME team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -140,12 +140,13 @@ BOOL CALLBACK Slot1Box_Proc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
|||
case IDOK:
|
||||
{
|
||||
int Msg = IDYES;
|
||||
if (romloaded && (needReset_slot1 || (temp_type_slot1!=slot1_device_type)) )
|
||||
{
|
||||
Msg = MessageBox(dialog,
|
||||
"After change slot1 device game will reset!\nAre you sure to continue?", "DeSmuME",
|
||||
MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2);
|
||||
}
|
||||
//zero 30-aug-2012 - do we really need to reset whenever we change the slot 1 device? why should resetting matter? if thats what you want to do, then do it.
|
||||
//if (romloaded && (needReset_slot1 || (temp_type_slot1!=slot1_device_type)) )
|
||||
//{
|
||||
// Msg = MessageBox(dialog,
|
||||
// "After change slot1 device game will reset!\nAre you sure to continue?", "DeSmuME",
|
||||
// MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2);
|
||||
//}
|
||||
if (Msg == IDYES)
|
||||
{
|
||||
if (wndConfigSlot1) DestroyWindow(wndConfigSlot1);
|
||||
|
@ -194,7 +195,7 @@ void slot1Dialog(HWND hwnd)
|
|||
last_type_slot1 = temp_type_slot1;
|
||||
_OKbutton_slot1 = false;
|
||||
needReset_slot1 = true;
|
||||
u32 res=DialogBoxW(hAppInst, MAKEINTRESOURCEW(IDD_GBASLOT), hwnd, (DLGPROC)Slot1Box_Proc);
|
||||
u32 res=DialogBoxW(hAppInst, MAKEINTRESOURCEW(IDD_SLOT1CONFIG), hwnd, (DLGPROC)Slot1Box_Proc);
|
||||
if (res)
|
||||
{
|
||||
switch (temp_type_slot1)
|
||||
|
@ -222,8 +223,9 @@ void slot1Dialog(HWND hwnd)
|
|||
WritePrivateProfileInt("Slot1","type",temp_type_slot1,IniName);
|
||||
|
||||
slot1Change((NDS_SLOT1_TYPE)temp_type_slot1);
|
||||
if (romloaded && needReset_slot1)
|
||||
NDS_Reset();
|
||||
//zero 30-aug-2012
|
||||
//if (romloaded && needReset_slot1)
|
||||
// NDS_Reset();
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue