Move initialization stuff not strictly related with the
wx frontend in DesmumeFrame::NDSInitialize(). While at it add dummy firmware.
This commit is contained in:
parent
867ac232e9
commit
6b88ebf513
|
@ -17,6 +17,7 @@
|
|||
#include "render3D.h"
|
||||
#include "rasterize.h"
|
||||
#include "OGLRender.h"
|
||||
#include "firmware.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "snddx.h"
|
||||
|
@ -417,6 +418,7 @@ loop:
|
|||
void OnOpenRecent(wxCommandEvent &event);
|
||||
|
||||
private:
|
||||
struct NDS_fw_config_data fw_config;
|
||||
wxFileHistory* history;
|
||||
#ifdef GDB_STUB
|
||||
gdbstub_handle_t arm9_gdb_stub;
|
||||
|
@ -584,6 +586,17 @@ IMPLEMENT_APP(Desmume)
|
|||
static SPADInitialize PADInitialize;
|
||||
|
||||
void DesmumeFrame::NDSInitialize() {
|
||||
NDS_FillDefaultFirmwareConfigData( &fw_config);
|
||||
|
||||
#ifdef HAVE_LIBAGG
|
||||
Desmume_InitOnce();
|
||||
aggDraw.hud->attach((u8*)GPU_screen, 256, 384, 1024);//TODO
|
||||
#endif
|
||||
|
||||
//TODO
|
||||
addon_type = NDS_ADDON_NONE;
|
||||
addonsChangePak(addon_type);
|
||||
|
||||
#ifdef GDB_STUB
|
||||
arm9_memio = &arm9_base_memory_iface;
|
||||
arm7_memio = &arm7_base_memory_iface;
|
||||
|
@ -595,6 +608,8 @@ void DesmumeFrame::NDSInitialize() {
|
|||
#ifndef WIN32
|
||||
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
||||
#endif
|
||||
NDS_3D_ChangeCore(0);
|
||||
NDS_CreateDummyFirmware( &fw_config);
|
||||
}
|
||||
|
||||
bool Desmume::OnInit()
|
||||
|
@ -616,13 +631,6 @@ bool Desmume::OnInit()
|
|||
wxString emu_version(EMU_DESMUME_NAME_AND_VERSION(), wxConvUTF8);
|
||||
DesmumeFrame *frame = new DesmumeFrame(emu_version);
|
||||
frame->NDSInitialize();
|
||||
|
||||
#ifdef HAVE_LIBAGG
|
||||
Desmume_InitOnce();
|
||||
aggDraw.hud->attach((u8*)GPU_screen, 256, 384, 1024);//TODO
|
||||
#endif
|
||||
NDS_3D_ChangeCore(0);
|
||||
|
||||
|
||||
frame->Show(true);
|
||||
|
||||
|
@ -634,10 +642,6 @@ bool Desmume::OnInit()
|
|||
Initialize(&PADInitialize);
|
||||
#endif
|
||||
|
||||
//TODO
|
||||
addon_type = NDS_ADDON_NONE;
|
||||
addonsChangePak(addon_type);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue