diff --git a/desmume/src/movie.cpp b/desmume/src/movie.cpp
index bed4beb02..b5523823f 100644
--- a/desmume/src/movie.cpp
+++ b/desmume/src/movie.cpp
@@ -5,10 +5,11 @@
#include "utils/xstring.h"
#include "movie.h"
#include "NDSSystem.h"
+#include "debug.h"
using namespace std;
-#define FCEU_PrintError printlog
+#define FCEU_PrintError LOG
#define MOVIE_VERSION 1
diff --git a/desmume/src/windows/CWindow.cpp b/desmume/src/windows/CWindow.cpp
index b63b00365..f81dcd5df 100644
--- a/desmume/src/windows/CWindow.cpp
+++ b/desmume/src/windows/CWindow.cpp
@@ -148,14 +148,14 @@ bool TOOLSCLASS::close()
DWORD TOOLSCLASS::ThreadFunc()
{
MSG messages;
- printlog("Start thread\n");
+ LOG("Start thread\n");
GetLastError();
hwnd = CreateDialog(hInstance, MAKEINTRESOURCE(idd), NULL, (DLGPROC) dlgproc);
if (!hwnd)
{
- printlog("error creating dialog\n");
+ LOG("error creating dialog\n");
return (-2);
}
diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/desmume/src/windows/DeSmuME_2005.vcproj
index 745c1abf1..d0ace97cb 100644
--- a/desmume/src/windows/DeSmuME_2005.vcproj
+++ b/desmume/src/windows/DeSmuME_2005.vcproj
@@ -107,182 +107,6 @@
Name="VCPostBuildEventTool"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
void EMU_PrintError(const char* msg) {
- printlog(msg);
+ LOG(msg);
}
void EMU_PrintMessage(const char* msg) {
- printlog(msg);
+ LOG(msg);
}
bool DRV_AviBegin(const char* fname);
diff --git a/desmume/src/windows/console.h b/desmume/src/windows/console.h
index 53671aee3..527a0ff9b 100644
--- a/desmume/src/windows/console.h
+++ b/desmume/src/windows/console.h
@@ -26,4 +26,7 @@
#include
#include "debug.h"
+void OpenConsole();
+void CloseConsole();
+
#endif
\ No newline at end of file
diff --git a/desmume/src/windows/inputdx.cpp b/desmume/src/windows/inputdx.cpp
index 2b089ef38..2f984ce88 100644
--- a/desmume/src/windows/inputdx.cpp
+++ b/desmume/src/windows/inputdx.cpp
@@ -322,7 +322,7 @@ BOOL CALLBACK InputConfigDlgProc( HWND hDlg,
}
if (!inputCfg->Init(hDlg, &InputConfigDIProc))
- printlog("Input config: Error initialize DirectInput\n");
+ LOG("Input config: Error initialize DirectInput\n");
SetTimer(hDlg, IDD_INPUT_TIMER, 100, NULL);
return true;
@@ -372,7 +372,7 @@ void InputConfig(HWND hwnd)
delete inputCfg;
}
else
- printlog("Input config: Error create DI class\n");
+ LOG("Input config: Error create DI class\n");
inputCfg = NULL;
}
// =============================================== end Config input
@@ -514,8 +514,8 @@ BOOL INPUTCLASS::Init(HWND hParentWnd, INPUTPROC inputProc)
this->inputProc = inputProc;
#if 1
- if (pKeyboard != NULL) printlog("DirectX Input: keyboard is initialised\n");
- if (pJoystick != NULL) printlog("DirectX Input: joystick is initialised\n");
+ if (pKeyboard != NULL) LOG("DirectX Input: keyboard is initialised\n");
+ if (pJoystick != NULL) LOG("DirectX Input: joystick is initialised\n");
#endif
paused = FALSE;
diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp
index fc29ad9d9..68157186a 100644
--- a/desmume/src/windows/main.cpp
+++ b/desmume/src/windows/main.cpp
@@ -748,12 +748,12 @@ void Display()
}
}
else
- printlog("16bit depth color not supported");
+ LOG("16bit depth color not supported");
IDirectDrawSurface7_Unlock(lpBackSurface,(LPRECT)ddsd.lpSurface);
if (IDirectDrawSurface7_Blt(lpPrimarySurface,&MainWindowRect,lpBackSurface,0, DDBLT_WAIT,0)==DDERR_SURFACELOST)
{
- printlog("DirectDraw buffers is lost\n");
+ LOG("DirectDraw buffers is lost\n");
if (IDirectDrawSurface7_Restore(lpPrimarySurface)==DD_OK)
IDirectDrawSurface7_Restore(lpBackSurface);
}
@@ -762,7 +762,7 @@ void Display()
{
if (res==DDERR_SURFACELOST)
{
- printlog("DirectDraw buffers is lost\n");
+ LOG("DirectDraw buffers is lost\n");
if (IDirectDrawSurface7_Restore(lpPrimarySurface)==DD_OK)
IDirectDrawSurface7_Restore(lpBackSurface);
}
@@ -995,7 +995,7 @@ void NDS_Pause()
paused = TRUE;
SPU_Pause(1);
while (!paused) {}
- printlog("Paused\n");
+ LOG("Paused\n");
}
}
@@ -1006,7 +1006,7 @@ void NDS_UnPause()
paused = FALSE;
execute = TRUE;
SPU_Pause(0);
- printlog("Unpaused\n");
+ LOG("Unpaused\n");
}
}
@@ -1042,16 +1042,16 @@ void StateLoadSlot(int num)
BOOL LoadROM(char * filename, const char *cflash_disk_image)
{
NDS_Pause();
- if (strcmp(filename,"")!=0) printlog("Attempting to load ROM: %s\n",filename);
+ if (strcmp(filename,"")!=0) LOG("Attempting to load ROM: %s\n",filename);
if (NDS_LoadROM(filename, backupmemorytype, backupmemorysize, cflash_disk_image) > 0)
{
- printlog("Loading %s was successful\n",filename);
+ LOG("Loading %s was successful\n",filename);
frameCounter=0;
UpdateRecentRoms(filename);
return TRUE;
}
- printlog("Loading %s FAILED.\n",filename);
+ LOG("Loading %s FAILED.\n",filename);
return FALSE;
}
@@ -1251,7 +1251,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
recentromsmenu = CreateMenu(); //Create recent Roms menu
GetRecentRoms(); //Populate the recent roms menu
- printlog("Init NDS\n");
+ LOG("Init NDS\n");
input = new INPUTCLASS();
if (!input->Init(MainWindow->getHWnd(), &NDS_inputPost))
@@ -1333,7 +1333,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
#ifdef BETA_VERSION
EnableMenuItem (menu, IDM_SUBMITBUGREPORT, MF_GRAYED);
#endif
- printlog("Init sound core\n");
+ LOG("Init sound core\n");
sndcoretype = GetPrivateProfileInt("Sound","SoundCore", SNDCORE_DIRECTX, IniName);
sndbuffersize = GetPrivateProfileInt("Sound","SoundBufferSize", 735 * 4, IniName);
@@ -1423,7 +1423,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
//------SHUTDOWN
#ifdef DEBUG
- LogStop();
+ //LogStop();
#endif
if (input!=NULL) delete input;
if (ViewLights!=NULL) delete ViewLights;
@@ -1573,7 +1573,7 @@ void OpenRecentROM(int listNum)
if (listNum > MAX_RECENT_ROMS) return; //Just in case
char filename[MAX_PATH];
strcpy(filename, RecentRoms[listNum].c_str());
- printlog("Attempting to load %s\n",filename);
+ LOG("Attempting to load %s\n",filename);
if(LoadROM(filename, bad_glob_cflash_disk_image_file))
{
EnableMenuItem(menu, IDM_PAUSE, MF_ENABLED);
diff --git a/desmume/src/windows/ogl.cpp b/desmume/src/windows/ogl.cpp
index 6c83ae3fe..7892304dd 100644
--- a/desmume/src/windows/ogl.cpp
+++ b/desmume/src/windows/ogl.cpp
@@ -62,9 +62,9 @@ bool windows_opengl_init()
res=CheckHardwareSupport(oglDC);
if (res>=0&&res<=2)
- printlog("OpenGL mode: %s\n",opengl_modes[res]);
+ LOG("OpenGL mode: %s\n",opengl_modes[res]);
else
- printlog("OpenGL mode: uknown\n");
+ LOG("OpenGL mode: uknown\n");
return true;
}
\ No newline at end of file