remove agg and osd stuff from emulator core to a frontend module
This commit is contained in:
parent
012b8d9e19
commit
81d1070d9a
|
@ -42,7 +42,6 @@
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
#include "gfx3d.h"
|
#include "gfx3d.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "NDSSystem.h"
|
#include "NDSSystem.h"
|
||||||
#include "readwrite.h"
|
#include "readwrite.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
|
@ -6762,9 +6761,10 @@ GPUSubsystem::GPUSubsystem()
|
||||||
|
|
||||||
_willAutoResolveToCustomBuffer = true;
|
_willAutoResolveToCustomBuffer = true;
|
||||||
|
|
||||||
OSDCLASS *previousOSD = osd;
|
//TODO OSD
|
||||||
osd = new OSDCLASS(-1);
|
//OSDCLASS *previousOSD = osd;
|
||||||
delete previousOSD;
|
//osd = new OSDCLASS(-1);
|
||||||
|
//delete previousOSD;
|
||||||
|
|
||||||
_displayInfo.colorFormat = NDSColorFormat_BGR555_Rev;
|
_displayInfo.colorFormat = NDSColorFormat_BGR555_Rev;
|
||||||
_displayInfo.pixelBytes = sizeof(u16);
|
_displayInfo.pixelBytes = sizeof(u16);
|
||||||
|
@ -6798,8 +6798,9 @@ GPUSubsystem::GPUSubsystem()
|
||||||
|
|
||||||
GPUSubsystem::~GPUSubsystem()
|
GPUSubsystem::~GPUSubsystem()
|
||||||
{
|
{
|
||||||
delete osd;
|
//TODO OSD
|
||||||
osd = NULL;
|
//delete osd;
|
||||||
|
//osd = NULL;
|
||||||
|
|
||||||
free_aligned(this->_customFramebuffer);
|
free_aligned(this->_customFramebuffer);
|
||||||
free_aligned(this->_customVRAM);
|
free_aligned(this->_customVRAM);
|
||||||
|
@ -6876,7 +6877,9 @@ void GPUSubsystem::Reset()
|
||||||
this->_engineSub->Reset();
|
this->_engineSub->Reset();
|
||||||
|
|
||||||
DISP_FIFOreset();
|
DISP_FIFOreset();
|
||||||
osd->clear();
|
|
||||||
|
//historically, we reset the OSD here. maybe because we would want a clean drawing surface? anyway this is not the right point to be doing OSD work
|
||||||
|
//osd->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUSubsystem::ForceRender3DFinishAndFlush(bool willFlush)
|
void GPUSubsystem::ForceRender3DFinishAndFlush(bool willFlush)
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright (C) 2010 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
|
|
||||||
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.
|
|
||||||
|
|
||||||
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 "types.h"
|
|
||||||
#include "GPU_osd.h"
|
|
||||||
|
|
||||||
OSDCLASS *osd;
|
|
||||||
|
|
||||||
OSDCLASS::OSDCLASS(u8 core) {}
|
|
||||||
OSDCLASS::~OSDCLASS() {}
|
|
||||||
void OSDCLASS::update() {}
|
|
||||||
void OSDCLASS::clear() {}
|
|
||||||
void OSDCLASS::setLineColor(u8 r, u8 b, u8 g) {}
|
|
||||||
void OSDCLASS::addLine(const char *fmt, ...) {}
|
|
||||||
|
|
||||||
void DrawHUD() {}
|
|
|
@ -22,6 +22,10 @@
|
||||||
#include "gfx3d.h"
|
#include "gfx3d.h"
|
||||||
#include "texcache.h"
|
#include "texcache.h"
|
||||||
|
|
||||||
|
#if HAVE_LIBAGG
|
||||||
|
#include "frontend/modules/osd/agg/agg_osd.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static VIEW3D_Driver nullView3d;
|
static VIEW3D_Driver nullView3d;
|
||||||
BaseDriver::BaseDriver()
|
BaseDriver::BaseDriver()
|
||||||
|
@ -50,3 +54,15 @@ void BaseDriver::USR_InfoMessage(const char *message)
|
||||||
LOG("%s\n", message);
|
LOG("%s\n", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseDriver::AddLine(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
#if HAVE_LIBAGG
|
||||||
|
osd->addLine(fmt);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
void BaseDriver::SetLineColor(u8 r, u8 b, u8 g)
|
||||||
|
{
|
||||||
|
#if HAVE_LIBAGG
|
||||||
|
osd->setLineColor(r,b,g);
|
||||||
|
#endif
|
||||||
|
}
|
|
@ -70,6 +70,9 @@ public:
|
||||||
VIEW3D_Driver* view3d;
|
VIEW3D_Driver* view3d;
|
||||||
void VIEW3D_Shutdown();
|
void VIEW3D_Shutdown();
|
||||||
void VIEW3D_Init();
|
void VIEW3D_Init();
|
||||||
|
|
||||||
|
virtual void AddLine(const char *fmt, ...);
|
||||||
|
virtual void SetLineColor(u8 r, u8 b, u8 g);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_DRIVER_H_
|
#endif //_DRIVER_H_
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "GPU_osd.h"
|
#include "agg_osd.h"
|
||||||
#include "driver.h"
|
#include "driver.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
|
@ -215,9 +215,7 @@ libdesmume_a_SOURCES += ../../metaspu/SndOut.cpp ../../metaspu/SndOut.h ../../me
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_LIBAGG
|
if HAVE_LIBAGG
|
||||||
libdesmume_a_SOURCES += ../../aggdraw.cpp ../../aggdraw.h ../../GPU_osd.cpp
|
libdesmume_a_SOURCES += ../../frontend/modules/osd/agg/aggdraw.cpp ../../frontend/modules/osd/agg/aggdraw.h ../../frontend/modules/osd/agg/agg_osd.cpp
|
||||||
else
|
|
||||||
libdesmume_a_SOURCES += ../../GPU_osd_stub.cpp
|
|
||||||
endif
|
endif
|
||||||
if HAVE_LUA
|
if HAVE_LUA
|
||||||
AM_CPPFLAGS += $(LUA_CFLAGS)
|
AM_CPPFLAGS += $(LUA_CFLAGS)
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
#include "../render3D.h"
|
#include "../render3D.h"
|
||||||
#include "../rasterize.h"
|
#include "../rasterize.h"
|
||||||
#include "../saves.h"
|
#include "../saves.h"
|
||||||
#include "../GPU_osd.h"
|
#include "../frontend/modules/osd/agg/agg_osd.h"
|
||||||
#include "../shared/desmume_config.h"
|
#include "../shared/desmume_config.h"
|
||||||
#include "../commandline.h"
|
#include "../commandline.h"
|
||||||
#include "../slot2.h"
|
#include "../slot2.h"
|
||||||
|
@ -765,8 +765,11 @@ int main(int argc, char ** argv) {
|
||||||
while(!ctrls_cfg.sdl_quit) {
|
while(!ctrls_cfg.sdl_quit) {
|
||||||
desmume_cycle(&ctrls_cfg);
|
desmume_cycle(&ctrls_cfg);
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBAGG
|
||||||
osd->update();
|
osd->update();
|
||||||
DrawHUD();
|
DrawHUD();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef INCLUDE_OPENGL_2D
|
#ifdef INCLUDE_OPENGL_2D
|
||||||
if ( my_config.opengl_2d) {
|
if ( my_config.opengl_2d) {
|
||||||
opengl_Draw( screen_texture, my_config.soft_colour_convert);
|
opengl_Draw( screen_texture, my_config.soft_colour_convert);
|
||||||
|
@ -775,7 +778,10 @@ int main(int argc, char ** argv) {
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
Draw();
|
Draw();
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBAGG
|
||||||
osd->clear();
|
osd->clear();
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( int i = 0; i < my_config.frameskip; i++ ) {
|
for ( int i = 0; i < my_config.frameskip; i++ ) {
|
||||||
NDS_SkipNextFrame();
|
NDS_SkipNextFrame();
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include "dTool.h"
|
#include "dTool.h"
|
||||||
#include "../shared/desmume_config.h"
|
#include "../shared/desmume_config.h"
|
||||||
#include "cheatsGTK.h"
|
#include "cheatsGTK.h"
|
||||||
#include "GPU_osd.h"
|
#include "frontend/modules/osd/agg/agg_osd.h"
|
||||||
|
|
||||||
#include "avout_x264.h"
|
#include "avout_x264.h"
|
||||||
#include "avout_flac.h"
|
#include "avout_flac.h"
|
||||||
|
@ -2706,10 +2706,10 @@ static void ToggleAudio (GtkToggleAction *action)
|
||||||
config.audio_enabled = gtk_toggle_action_get_active(action);
|
config.audio_enabled = gtk_toggle_action_get_active(action);
|
||||||
if (config.audio_enabled) {
|
if (config.audio_enabled) {
|
||||||
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
|
||||||
osd->addLine("Audio enabled");
|
driver->AddLine("Audio enabled");
|
||||||
} else {
|
} else {
|
||||||
SPU_ChangeSoundCore(0, 0);
|
SPU_ChangeSoundCore(0, 0);
|
||||||
osd->addLine("Audio disabled");
|
driver->AddLine("Audio disabled");
|
||||||
}
|
}
|
||||||
RedrawScreen();
|
RedrawScreen();
|
||||||
}
|
}
|
||||||
|
@ -2721,9 +2721,9 @@ static void ToggleMicNoise (GtkToggleAction *action)
|
||||||
|
|
||||||
Mic_DoNoise(doNoise);
|
Mic_DoNoise(doNoise);
|
||||||
if (doNoise)
|
if (doNoise)
|
||||||
osd->addLine("Fake mic enabled");
|
driver->AddLine("Fake mic enabled");
|
||||||
else
|
else
|
||||||
osd->addLine("Fake mic disabled");
|
driver->AddLine("Fake mic disabled");
|
||||||
RedrawScreen();
|
RedrawScreen();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2733,9 +2733,9 @@ static void ToggleFpsLimiter (GtkToggleAction *action)
|
||||||
config.fpslimiter = (BOOL)gtk_toggle_action_get_active(action);
|
config.fpslimiter = (BOOL)gtk_toggle_action_get_active(action);
|
||||||
|
|
||||||
if (config.fpslimiter)
|
if (config.fpslimiter)
|
||||||
osd->addLine("Fps limiter enabled");
|
driver->AddLine("Fps limiter enabled");
|
||||||
else
|
else
|
||||||
osd->addLine("Fps limiter disabled");
|
driver->AddLine("Fps limiter disabled");
|
||||||
RedrawScreen();
|
RedrawScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2746,11 +2746,11 @@ static void ToggleAutoFrameskip (GtkToggleAction *action)
|
||||||
if (config.autoframeskip) {
|
if (config.autoframeskip) {
|
||||||
autoframeskip = true;
|
autoframeskip = true;
|
||||||
Frameskip = 0;
|
Frameskip = 0;
|
||||||
osd->addLine("Auto frameskip enabled");
|
driver->AddLine("Auto frameskip enabled");
|
||||||
} else {
|
} else {
|
||||||
autoframeskip = false;
|
autoframeskip = false;
|
||||||
Frameskip = autoFrameskipMax;
|
Frameskip = autoFrameskipMax;
|
||||||
osd->addLine("Auto frameskip disabled");
|
driver->AddLine("Auto frameskip disabled");
|
||||||
}
|
}
|
||||||
RedrawScreen();
|
RedrawScreen();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,11 +21,15 @@
|
||||||
#include "SPU.h"
|
#include "SPU.h"
|
||||||
#include "commandline.h"
|
#include "commandline.h"
|
||||||
#include "NDSSystem.h"
|
#include "NDSSystem.h"
|
||||||
#include "GPU_osd.h"
|
#include "frontend/modules/osd/agg/agg_osd.h"
|
||||||
|
#include "driver.h"
|
||||||
|
|
||||||
#ifdef FAKE_MIC
|
#ifdef FAKE_MIC
|
||||||
#include "mic.h"
|
#include "mic.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
u16 keyboard_cfg[NB_KEYS];
|
u16 keyboard_cfg[NB_KEYS];
|
||||||
u16 joypad_cfg[NB_KEYS];
|
u16 joypad_cfg[NB_KEYS];
|
||||||
u16 nbr_joy;
|
u16 nbr_joy;
|
||||||
|
@ -481,7 +485,7 @@ process_ctrls_event( SDL_Event& event,
|
||||||
if (event.active.gain) {
|
if (event.active.gain) {
|
||||||
cfg->focused = 1;
|
cfg->focused = 1;
|
||||||
SPU_Pause(0);
|
SPU_Pause(0);
|
||||||
osd->addLine("Auto pause disabled");
|
driver->AddLine("Auto pause disabled");
|
||||||
} else {
|
} else {
|
||||||
cfg->focused = 0;
|
cfg->focused = 0;
|
||||||
SPU_Pause(1);
|
SPU_Pause(1);
|
||||||
|
@ -515,18 +519,18 @@ process_ctrls_event( SDL_Event& event,
|
||||||
cfg->fake_mic = !cfg->fake_mic;
|
cfg->fake_mic = !cfg->fake_mic;
|
||||||
Mic_DoNoise(cfg->fake_mic);
|
Mic_DoNoise(cfg->fake_mic);
|
||||||
if (cfg->fake_mic)
|
if (cfg->fake_mic)
|
||||||
osd->addLine("Fake mic enabled");
|
driver->AddLine("Fake mic enabled");
|
||||||
else
|
else
|
||||||
osd->addLine("Fake mic disabled");
|
driver->AddLine("Fake mic disabled");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SDLK_o:
|
case SDLK_o:
|
||||||
cfg->boost = !cfg->boost;
|
cfg->boost = !cfg->boost;
|
||||||
if (cfg->boost)
|
if (cfg->boost)
|
||||||
osd->addLine("Boost mode enabled");
|
driver->AddLine("Boost mode enabled");
|
||||||
else
|
else
|
||||||
osd->addLine("Boost mode disabled");
|
driver->AddLine("Boost mode disabled");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDLK_LSHIFT:
|
case SDLK_LSHIFT:
|
||||||
|
|
|
@ -25,12 +25,13 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "gfx3d.h"
|
#include "gfx3d.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "SPU.h"
|
#include "SPU.h"
|
||||||
|
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "windriver.h"
|
#include "windriver.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "driver.h"
|
||||||
|
#include "NDSSystem.h"
|
||||||
|
|
||||||
extern VideoInfo video;
|
extern VideoInfo video;
|
||||||
|
|
||||||
|
@ -397,7 +398,7 @@ bool DRV_AviBegin(const char* fname)
|
||||||
// Don't display at file splits
|
// Don't display at file splits
|
||||||
if(!avi_segnum) {
|
if(!avi_segnum) {
|
||||||
EMU_PrintMessage("AVI recording started.");
|
EMU_PrintMessage("AVI recording started.");
|
||||||
osd->addLine("AVI recording started.");
|
driver->AddLine("AVI recording started.");
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(saved_cur_avi_fnameandext,fname,MAX_PATH);
|
strncpy(saved_cur_avi_fnameandext,fname,MAX_PATH);
|
||||||
|
@ -483,7 +484,7 @@ void DRV_AviEnd()
|
||||||
// Don't display if we're just starting another segment
|
// Don't display if we're just starting another segment
|
||||||
if(avi_file->tBytes <= 2097152000) {
|
if(avi_file->tBytes <= 2097152000) {
|
||||||
EMU_PrintMessage("AVI recording ended.");
|
EMU_PrintMessage("AVI recording ended.");
|
||||||
osd->addLine("AVI recording ended.");
|
driver->AddLine("AVI recording ended.");
|
||||||
}
|
}
|
||||||
|
|
||||||
avi_destroy(&avi_file);
|
avi_destroy(&avi_file);
|
||||||
|
|
|
@ -149,6 +149,9 @@
|
||||||
<PreprocessorDefinitions Condition="'$(GDB_STUB)' == 'true'">GDB_STUB=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(GDB_STUB)' == 'true'">GDB_STUB=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions Condition="'$(EXPERIMENTAL_WIFI_COMM)' == 'true'">EXPERIMENTAL_WIFI_COMM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(EXPERIMENTAL_WIFI_COMM)' == 'true'">EXPERIMENTAL_WIFI_COMM=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
||||||
|
<!-- desmume configuration: features we always have in windows -->
|
||||||
|
<PreprocessorDefinitions>HAVE_LIBAGG=1;HAVE_JIT=1;HAVE_LUA=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
||||||
<Link>
|
<Link>
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#include "movie.h"
|
#include "movie.h"
|
||||||
#include "SPU.h"
|
#include "SPU.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
#include "driver.h"
|
||||||
#include "frontend/modules/ImageOut.h"
|
#include "frontend/modules/ImageOut.h"
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
@ -108,7 +108,7 @@ void HK_CpuMode(int, bool justPressed)
|
||||||
|
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
sprintf(tmp,"CPU mode: %s", CommonSettings.use_jit?"JIT":"Interpreter");
|
sprintf(tmp,"CPU mode: %s", CommonSettings.use_jit?"JIT":"Interpreter");
|
||||||
osd->addLine(tmp);
|
driver->AddLine(tmp);
|
||||||
//WritePrivateProfileInt("Emulation", "CpuMode", CommonSettings.use_jit, IniName)
|
//WritePrivateProfileInt("Emulation", "CpuMode", CommonSettings.use_jit, IniName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void HK_JitBlockSizeDec(int, bool justPressed)
|
||||||
CommonSettings.jit_max_block_size--;
|
CommonSettings.jit_max_block_size--;
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
sprintf(tmp,"JIT block size changed to: %u", CommonSettings.jit_max_block_size);
|
sprintf(tmp,"JIT block size changed to: %u", CommonSettings.jit_max_block_size);
|
||||||
osd->addLine(tmp);
|
driver->AddLine(tmp);
|
||||||
arm_jit_reset(CommonSettings.use_jit, true);
|
arm_jit_reset(CommonSettings.use_jit, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ void HK_JitBlockSizeInc(int, bool justPressed)
|
||||||
CommonSettings.jit_max_block_size++;
|
CommonSettings.jit_max_block_size++;
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
sprintf(tmp,"JIT block size changed to: %u", CommonSettings.jit_max_block_size);
|
sprintf(tmp,"JIT block size changed to: %u", CommonSettings.jit_max_block_size);
|
||||||
osd->addLine(tmp);
|
driver->AddLine(tmp);
|
||||||
arm_jit_reset(CommonSettings.use_jit, true);
|
arm_jit_reset(CommonSettings.use_jit, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -278,7 +278,7 @@ void HK_StateSetSlot(int num, bool justPressed)
|
||||||
if (romloaded)
|
if (romloaded)
|
||||||
{
|
{
|
||||||
lastSaveState = num;
|
lastSaveState = num;
|
||||||
osd->addLine("State %i selected", num);
|
driver->AddLine("State %i selected", num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,12 +370,12 @@ void HK_ToggleReadOnly(int, bool justPressed) {
|
||||||
if(movieMode == MOVIEMODE_FINISHED)
|
if(movieMode == MOVIEMODE_FINISHED)
|
||||||
pMsg += sprintf(pMsg, " (finished)");
|
pMsg += sprintf(pMsg, " (finished)");
|
||||||
if(movieMode == MOVIEMODE_INACTIVE)
|
if(movieMode == MOVIEMODE_INACTIVE)
|
||||||
osd->setLineColor(255,0,0);
|
driver->SetLineColor(255,0,0);
|
||||||
else if(movieMode == MOVIEMODE_FINISHED)
|
else if(movieMode == MOVIEMODE_FINISHED)
|
||||||
osd->setLineColor(255,255,0);
|
driver->SetLineColor(255,255,0);
|
||||||
else
|
else
|
||||||
osd->setLineColor(255,255,255);
|
driver->SetLineColor(255,255,255);
|
||||||
osd->addLine(msg);
|
driver->AddLine(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_PlayMovie(int, bool justPressed)
|
void HK_PlayMovie(int, bool justPressed)
|
||||||
|
@ -454,7 +454,7 @@ void HK_NextSaveSlot(int, bool justPressed) {
|
||||||
lastSaveState++;
|
lastSaveState++;
|
||||||
if(lastSaveState>9)
|
if(lastSaveState>9)
|
||||||
lastSaveState=0;
|
lastSaveState=0;
|
||||||
osd->addLine("State %i selected", lastSaveState);
|
driver->AddLine("State %i selected", lastSaveState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_PreviousSaveSlot(int, bool justPressed) {
|
void HK_PreviousSaveSlot(int, bool justPressed) {
|
||||||
|
@ -463,7 +463,7 @@ void HK_PreviousSaveSlot(int, bool justPressed) {
|
||||||
lastSaveState=9;
|
lastSaveState=9;
|
||||||
else
|
else
|
||||||
lastSaveState--;
|
lastSaveState--;
|
||||||
osd->addLine("State %i selected", lastSaveState);
|
driver->AddLine("State %i selected", lastSaveState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_Pause(int, bool justPressed) { if(justPressed) TogglePause(); }
|
void HK_Pause(int, bool justPressed) { if(justPressed) TogglePause(); }
|
||||||
|
@ -491,18 +491,18 @@ void HK_ToggleRasterizer(int, bool justPressed) {
|
||||||
void HK_IncreasePressure(int, bool justPressed) {
|
void HK_IncreasePressure(int, bool justPressed) {
|
||||||
CommonSettings.StylusPressure += 10;
|
CommonSettings.StylusPressure += 10;
|
||||||
if(CommonSettings.StylusPressure>100) CommonSettings.StylusPressure = 100;
|
if(CommonSettings.StylusPressure>100) CommonSettings.StylusPressure = 100;
|
||||||
osd->addLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
driver->AddLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
||||||
}
|
}
|
||||||
void HK_DecreasePressure(int, bool justPressed) {
|
void HK_DecreasePressure(int, bool justPressed) {
|
||||||
CommonSettings.StylusPressure -= 10;
|
CommonSettings.StylusPressure -= 10;
|
||||||
if(CommonSettings.StylusPressure<0) CommonSettings.StylusPressure = 0;
|
if(CommonSettings.StylusPressure<0) CommonSettings.StylusPressure = 0;
|
||||||
osd->addLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
driver->AddLine("Stylus Pressure to %d%%",CommonSettings.StylusPressure);
|
||||||
}
|
}
|
||||||
void HK_ToggleStylusJitter(int, bool justPressed) {
|
void HK_ToggleStylusJitter(int, bool justPressed) {
|
||||||
CommonSettings.StylusJitter = !CommonSettings.StylusJitter;
|
CommonSettings.StylusJitter = !CommonSettings.StylusJitter;
|
||||||
nds.stylusJitter = CommonSettings.StylusJitter;
|
nds.stylusJitter = CommonSettings.StylusJitter;
|
||||||
WritePrivateProfileBool("Emulation", "StylusJitter", CommonSettings.StylusJitter, IniName);
|
WritePrivateProfileBool("Emulation", "StylusJitter", CommonSettings.StylusJitter, IniName);
|
||||||
osd->addLine("Stylus Jitter %s",CommonSettings.StylusJitter ? "On" : "Off");
|
driver->AddLine("Stylus Jitter %s",CommonSettings.StylusJitter ? "On" : "Off");
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_Rotate0(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 0);}
|
void HK_Rotate0(int, bool justPressed) { SetRotate(MainWindow->getHWnd(), 0);}
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
#include "slot1.h"
|
#include "slot1.h"
|
||||||
#include "slot2.h"
|
#include "slot2.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "SPU.h"
|
#include "SPU.h"
|
||||||
#include "OGLRender.h"
|
#include "OGLRender.h"
|
||||||
#include "OGLRender_3_2.h"
|
#include "OGLRender_3_2.h"
|
||||||
|
@ -83,8 +82,9 @@
|
||||||
#include "utils/xstring.h"
|
#include "utils/xstring.h"
|
||||||
#include "directx/ddraw.h"
|
#include "directx/ddraw.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "aggdraw.h"
|
#include "frontend/modules/osd/agg/agg_osd.h"
|
||||||
#include "agg2d.h"
|
#include "frontend/modules/osd/agg/aggdraw.h"
|
||||||
|
#include "frontend/modules/osd/agg/agg2d.h"
|
||||||
#include "winutil.h"
|
#include "winutil.h"
|
||||||
#include "ogl.h"
|
#include "ogl.h"
|
||||||
|
|
||||||
|
@ -2769,6 +2769,8 @@ class WinDriver : public BaseDriver
|
||||||
return inFrameBoundary;
|
return inFrameBoundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual eStepMainLoopResult EMU_StepMainLoop(bool allowSleep, bool allowPause, int frameSkip, bool disableUser, bool disableCore)
|
virtual eStepMainLoopResult EMU_StepMainLoop(bool allowSleep, bool allowPause, int frameSkip, bool disableUser, bool disableCore)
|
||||||
{
|
{
|
||||||
// this bit is here to handle calls through LUACALL_BEFOREEMULATION and in case Lua errors out while we're processing input
|
// this bit is here to handle calls through LUACALL_BEFOREEMULATION and in case Lua errors out while we're processing input
|
||||||
|
@ -3196,7 +3198,9 @@ int _main()
|
||||||
|
|
||||||
CommonSettings.wifi.mode = GetPrivateProfileInt("Wifi", "Mode", 0, IniName);
|
CommonSettings.wifi.mode = GetPrivateProfileInt("Wifi", "Mode", 0, IniName);
|
||||||
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
CommonSettings.wifi.infraBridgeAdapter = GetPrivateProfileInt("Wifi", "BridgeAdapter", 0, IniName);
|
||||||
|
|
||||||
|
osd = new OSDCLASS(-1);
|
||||||
|
|
||||||
NDS_Init();
|
NDS_Init();
|
||||||
GPU->SetCustomFramebufferSize(256*video.prescaleHD,192*video.prescaleHD);
|
GPU->SetCustomFramebufferSize(256*video.prescaleHD,192*video.prescaleHD);
|
||||||
//GPU->SetWillAutoBlitNativeToCustomBuffer(false); //we need to do this right now, because we depend on having one solitary framebuffer
|
//GPU->SetWillAutoBlitNativeToCustomBuffer(false); //we need to do this right now, because we depend on having one solitary framebuffer
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "GPU_osd.h"
|
#include "driver.h"
|
||||||
|
#include "NDSSystem.h"
|
||||||
#include "winutil.h"
|
#include "winutil.h"
|
||||||
|
|
||||||
int FastForward=0;
|
int FastForward=0;
|
||||||
|
@ -60,7 +60,7 @@ void IncreaseSpeed(void) {
|
||||||
desiredfps = core_desiredfps * desiredFpsScaler / 256;
|
desiredfps = core_desiredfps * desiredFpsScaler / 256;
|
||||||
desiredspf = 65536.0f / desiredfps;
|
desiredspf = 65536.0f / desiredfps;
|
||||||
printf("Throttle fps scaling increased to: %f\n",desiredFpsScaler/256.0);
|
printf("Throttle fps scaling increased to: %f\n",desiredFpsScaler/256.0);
|
||||||
osd->addLine("Target FPS up to %2.04f",desiredFpsScaler/256.0);
|
driver->AddLine("Target FPS up to %2.04f",desiredFpsScaler/256.0);
|
||||||
WritePrivateProfileInt("Video","FPS Scaler Index", desiredFpsScalerIndex, IniName);
|
WritePrivateProfileInt("Video","FPS Scaler Index", desiredFpsScalerIndex, IniName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void DecreaseSpeed(void) {
|
||||||
desiredfps = core_desiredfps * desiredFpsScaler / 256;
|
desiredfps = core_desiredfps * desiredFpsScaler / 256;
|
||||||
desiredspf = 65536.0f / desiredfps;
|
desiredspf = 65536.0f / desiredfps;
|
||||||
printf("Throttle fps scaling decreased to: %f\n",desiredFpsScaler/256.0);
|
printf("Throttle fps scaling decreased to: %f\n",desiredFpsScaler/256.0);
|
||||||
osd->addLine("Target FPS down to %2.04f",desiredFpsScaler/256.0);
|
driver->AddLine("Target FPS down to %2.04f",desiredFpsScaler/256.0);
|
||||||
WritePrivateProfileInt("Video","FPS Scaler Index", desiredFpsScalerIndex, IniName);
|
WritePrivateProfileInt("Video","FPS Scaler Index", desiredFpsScalerIndex, IniName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2009-2015 DeSmuME team
|
Copyright (C) 2009-2016 DeSmuME team
|
||||||
|
|
||||||
This file is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -35,6 +35,10 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LIBAGG
|
||||||
|
#include "frontend/modules/osd/agg/agg_osd.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -49,7 +53,6 @@
|
||||||
#include "movie.h"
|
#include "movie.h"
|
||||||
#include "MMU.h"
|
#include "MMU.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "SPU.h"
|
#include "SPU.h"
|
||||||
#include "saves.h"
|
#include "saves.h"
|
||||||
#include "emufile.h"
|
#include "emufile.h"
|
||||||
|
@ -2603,6 +2606,7 @@ static void prepare_drawing()
|
||||||
}
|
}
|
||||||
static void prepare_reading()
|
static void prepare_reading()
|
||||||
{
|
{
|
||||||
|
#if HAVE_LIBAGG
|
||||||
curGuiData = GetCurrentInfo().guiData;
|
curGuiData = GetCurrentInfo().guiData;
|
||||||
u32* buf = (u32*)aggDraw.screen->buf().buf();
|
u32* buf = (u32*)aggDraw.screen->buf().buf();
|
||||||
if(buf)
|
if(buf)
|
||||||
|
@ -2618,6 +2622,7 @@ static void prepare_reading()
|
||||||
curGuiData.stridePix = 256;
|
curGuiData.stridePix = 256;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// note: prepare_drawing or prepare_reading must be called,
|
// note: prepare_drawing or prepare_reading must be called,
|
||||||
|
@ -4171,8 +4176,6 @@ int dontworry(LuaContextInfo& info)
|
||||||
//agg basic shapes
|
//agg basic shapes
|
||||||
//TODO polygon and polyline, maybe the overloads for roundedRect and curve
|
//TODO polygon and polyline, maybe the overloads for roundedRect and curve
|
||||||
|
|
||||||
#include "aggdraw.h"
|
|
||||||
|
|
||||||
static int line(lua_State *L) {
|
static int line(lua_State *L) {
|
||||||
|
|
||||||
double x1,y1,x2,y2;
|
double x1,y1,x2,y2;
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "mic.h"
|
#include "mic.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "emufile.h"
|
#include "emufile.h"
|
||||||
|
|
||||||
|
@ -982,9 +981,9 @@ bool mov_loadstate(EMUFILE* fp, int size)
|
||||||
// this is a mode that behaves like "inactive"
|
// this is a mode that behaves like "inactive"
|
||||||
// except it permits switching to play/record by loading an earlier savestate.
|
// except it permits switching to play/record by loading an earlier savestate.
|
||||||
// (and we continue to store the finished movie in savestates made while finished)
|
// (and we continue to store the finished movie in savestates made while finished)
|
||||||
osd->setLineColor(255,0,0); // let's make the text red too to hopefully catch the user's attention a bit.
|
driver->SetLineColor(255,0,0); // let's make the text red too to hopefully catch the user's attention a bit.
|
||||||
FinishPlayback();
|
FinishPlayback();
|
||||||
osd->setLineColor(255,255,255);
|
driver->SetLineColor(255,255,255);
|
||||||
|
|
||||||
//FCEU_PrintError("Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.", currFrameCounter, currMovieData.records.size()-1);
|
//FCEU_PrintError("Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.", currFrameCounter, currMovieData.records.size()-1);
|
||||||
//return false;
|
//return false;
|
||||||
|
@ -1022,8 +1021,8 @@ bool mov_loadstate(EMUFILE* fp, int size)
|
||||||
openRecordingMovie(curMovieFilename);
|
openRecordingMovie(curMovieFilename);
|
||||||
if(!osRecordingMovie)
|
if(!osRecordingMovie)
|
||||||
{
|
{
|
||||||
osd->setLineColor(255, 0, 0);
|
driver->SetLineColor(255, 0, 0);
|
||||||
osd->addLine("Can't save movie file!");
|
driver->AddLine("Can't save movie file!");
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("DUMPING MOVIE: %d FRAMES\n",currMovieData.records.size());
|
//printf("DUMPING MOVIE: %d FRAMES\n",currMovieData.records.size());
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include "render3D.h"
|
#include "render3D.h"
|
||||||
#include "cp15.h"
|
#include "cp15.h"
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GPU_osd.h"
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include "readwrite.h"
|
#include "readwrite.h"
|
||||||
|
@ -699,13 +698,13 @@ void savestate_slot(int num)
|
||||||
|
|
||||||
if (savestate_save(filename))
|
if (savestate_save(filename))
|
||||||
{
|
{
|
||||||
osd->setLineColor(255, 255, 255);
|
driver->SetLineColor(255, 255, 255);
|
||||||
osd->addLine("Saved to %i slot", num);
|
driver->AddLine("Saved to %i slot", num);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
osd->setLineColor(255, 0, 0);
|
driver->SetLineColor(255, 0, 0);
|
||||||
osd->addLine("Error saving %i slot", num);
|
driver->AddLine("Error saving %i slot", num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -732,13 +731,13 @@ void loadstate_slot(int num)
|
||||||
sprintf(filename+strlen(filename), ".ds%d", num);
|
sprintf(filename+strlen(filename), ".ds%d", num);
|
||||||
if (savestate_load(filename))
|
if (savestate_load(filename))
|
||||||
{
|
{
|
||||||
osd->setLineColor(255, 255, 255);
|
driver->SetLineColor(255, 255, 255);
|
||||||
osd->addLine("Loaded from %i slot", num);
|
driver->AddLine("Loaded from %i slot", num);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
osd->setLineColor(255, 0, 0);
|
driver->SetLineColor(255, 0, 0);
|
||||||
osd->addLine("Error loading %i slot", num);
|
driver->AddLine("Error loading %i slot", num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,14 +48,6 @@
|
||||||
#define IF_DEVELOPER(X)
|
#define IF_DEVELOPER(X)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
#define HAVE_LIBAGG
|
|
||||||
#ifdef DEVELOPER
|
|
||||||
#define HAVE_LUA
|
|
||||||
#endif
|
|
||||||
#define HAVE_JIT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __SSE__
|
#ifdef __SSE__
|
||||||
#define ENABLE_SSE
|
#define ENABLE_SSE
|
||||||
|
|
Loading…
Reference in New Issue