Fixed windows build

This commit is contained in:
adelikat 2008-11-21 23:17:14 +00:00
parent ffc9f0284f
commit 2fabaf3003
8 changed files with 215 additions and 211 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -107,182 +107,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2005\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\&quot;Release\&quot;;WIN32;HAVE_LIBZ;HAVE_LIBZZIP;BETA_VERSION;SPU_INTERPOLATE;NOMINMAX"
StringPooling="true"
ExceptionHandling="1"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="1"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
GenerateDebugInformation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release (SSE2)|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2005\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\&quot;Release SSE2\&quot;;WIN32;HAVE_LIBZ;HAVE_LIBZZIP;SSE2;BETA_VERSION;SPU_INTERPOLATE;NOMINMAX"
StringPooling="true"
ExceptionHandling="1"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="1"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
GenerateDebugInformation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\__bins"
@ -370,6 +194,94 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2005\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\&quot;Release\&quot;;WIN32;HAVE_LIBZ;HAVE_LIBZZIP;BETA_VERSION;SPU_INTERPOLATE;NOMINMAX"
StringPooling="true"
ExceptionHandling="1"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="1"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
GenerateDebugInformation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\__bins"
@ -456,6 +368,94 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release (SSE2)|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2005\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\&quot;Release SSE2\&quot;;WIN32;HAVE_LIBZ;HAVE_LIBZZIP;SSE2;BETA_VERSION;SPU_INTERPOLATE;NOMINMAX"
StringPooling="true"
ExceptionHandling="1"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="1"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
GenerateDebugInformation="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release (SSE2)|x64"
OutputDirectory="$(SolutionDir)\__bins"
@ -933,6 +933,14 @@
Name="MASM"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="MASM"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
@ -945,7 +953,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release (SSE2)|Win32"
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
@ -956,15 +964,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="MASM"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="Release (SSE2)|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -997,7 +997,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@ -1005,7 +1005,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool

View File

@ -8,11 +8,11 @@
#include <stdio.h>
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);

View File

@ -26,4 +26,7 @@
#include <stdio.h>
#include "debug.h"
void OpenConsole();
void CloseConsole();
#endif

View File

@ -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;

View File

@ -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);

View File

@ -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;
}