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 "render3D.h"
|
||||||
#include "rasterize.h"
|
#include "rasterize.h"
|
||||||
#include "OGLRender.h"
|
#include "OGLRender.h"
|
||||||
|
#include "firmware.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "snddx.h"
|
#include "snddx.h"
|
||||||
|
@ -417,6 +418,7 @@ loop:
|
||||||
void OnOpenRecent(wxCommandEvent &event);
|
void OnOpenRecent(wxCommandEvent &event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct NDS_fw_config_data fw_config;
|
||||||
wxFileHistory* history;
|
wxFileHistory* history;
|
||||||
#ifdef GDB_STUB
|
#ifdef GDB_STUB
|
||||||
gdbstub_handle_t arm9_gdb_stub;
|
gdbstub_handle_t arm9_gdb_stub;
|
||||||
|
@ -584,6 +586,17 @@ IMPLEMENT_APP(Desmume)
|
||||||
static SPADInitialize PADInitialize;
|
static SPADInitialize PADInitialize;
|
||||||
|
|
||||||
void DesmumeFrame::NDSInitialize() {
|
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
|
#ifdef GDB_STUB
|
||||||
arm9_memio = &arm9_base_memory_iface;
|
arm9_memio = &arm9_base_memory_iface;
|
||||||
arm7_memio = &arm7_base_memory_iface;
|
arm7_memio = &arm7_base_memory_iface;
|
||||||
|
@ -595,6 +608,8 @@ void DesmumeFrame::NDSInitialize() {
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
||||||
#endif
|
#endif
|
||||||
|
NDS_3D_ChangeCore(0);
|
||||||
|
NDS_CreateDummyFirmware( &fw_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Desmume::OnInit()
|
bool Desmume::OnInit()
|
||||||
|
@ -617,13 +632,6 @@ bool Desmume::OnInit()
|
||||||
DesmumeFrame *frame = new DesmumeFrame(emu_version);
|
DesmumeFrame *frame = new DesmumeFrame(emu_version);
|
||||||
frame->NDSInitialize();
|
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);
|
frame->Show(true);
|
||||||
|
|
||||||
PADInitialize.padNumber = 1;
|
PADInitialize.padNumber = 1;
|
||||||
|
@ -634,10 +642,6 @@ bool Desmume::OnInit()
|
||||||
Initialize(&PADInitialize);
|
Initialize(&PADInitialize);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//TODO
|
|
||||||
addon_type = NDS_ADDON_NONE;
|
|
||||||
addonsChangePak(addon_type);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue