From a9d4f73ad172ad71e25b934e88f4925b78158004 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sun, 23 Dec 2007 13:19:52 +0000 Subject: [PATCH] fixed some x64 compiler errors/warnings we still need a GLEW x64 lib --- VBA.sln | 6 ++++-- VBA.vcproj | 4 ++-- src/win32/Joypad.cpp | 2 +- src/win32/Joypad.h | 2 +- src/win32/OpenGL.cpp | 6 +++--- src/win32/SelectPlugin.cpp | 4 ++-- src/win32/SelectPlugin.h | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/VBA.sln b/VBA.sln index fa62f564..c89b4e85 100644 --- a/VBA.sln +++ b/VBA.sln @@ -61,10 +61,12 @@ Global {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Release|x64.Build.0 = Release|x64 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|Win32.ActiveCfg = Debug|Win32 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|Win32.Build.0 = Debug|Win32 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|x64.ActiveCfg = Debug|Win32 + {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|x64.ActiveCfg = Debug|x64 + {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|x64.Build.0 = Debug|x64 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|Win32.ActiveCfg = Release|Win32 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|Win32.Build.0 = Release|Win32 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|x64.ActiveCfg = Release|Win32 + {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|x64.ActiveCfg = Release|x64 + {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/VBA.vcproj b/VBA.vcproj index 196ee02e..adc1388a 100644 --- a/VBA.vcproj +++ b/VBA.vcproj @@ -165,7 +165,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng;"..\dependencies\File_Extractor-0.4.2\fex";..\dependencies\cximage;..\dependencies\msvc" - PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;CRT_SECURE_NO_WARNINGS;HAS_FILE_EXTRACTOR;C_CORE" + PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;_CRT_SECURE_NO_WARNINGS;HAS_FILE_EXTRACTOR;C_CORE" StringPooling="false" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -402,7 +402,7 @@ FavorSizeOrSpeed="1" WholeProgramOptimization="true" AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng;"..\dependencies\File_Extractor-0.4.2\fex";..\dependencies\cximage;..\dependencies\msvc" - PreprocessorDefinitions="WIN32;WINVER=0x0500;NDEBUG;_WINDOWS;OEMRESOURCE;MMX;ASM;FINAL_VERSION;BKPT_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAS_FILE_EXTRACTOR" + PreprocessorDefinitions="WIN32;WINVER=0x0500;NDEBUG;_WINDOWS;OEMRESOURCE;C_CORE;FINAL_VERSION;BKPT_SUPPORT;_CRT_SECURE_NO_WARNINGS;HAS_FILE_EXTRACTOR" RuntimeLibrary="0" BufferSecurityCheck="false" EnableEnhancedInstructionSet="0" diff --git a/src/win32/Joypad.cpp b/src/win32/Joypad.cpp index c491e260..46deeb95 100644 --- a/src/win32/Joypad.cpp +++ b/src/win32/Joypad.cpp @@ -33,7 +33,7 @@ static char THIS_FILE[] = __FILE__; BOOL bAppendMode; -void AssignKey(KeyList &Key, int Out) +void AssignKey(KeyList &Key, LONG_PTR Out) { if( !bAppendMode ) { Key.RemoveAll(); diff --git a/src/win32/Joypad.h b/src/win32/Joypad.h index bfc16016..141a0fae 100644 --- a/src/win32/Joypad.h +++ b/src/win32/Joypad.h @@ -166,7 +166,7 @@ class MotionConfig : public CDialog //}}AFX_MSG DECLARE_MESSAGE_MAP() private: - UINT timerId; + UINT_PTR timerId; public: afx_msg void OnBnClickedAppendmode(); }; diff --git a/src/win32/OpenGL.cpp b/src/win32/OpenGL.cpp index a9ba63a2..50279984 100644 --- a/src/win32/OpenGL.cpp +++ b/src/win32/OpenGL.cpp @@ -140,7 +140,7 @@ char *readShaderFile(char *FileName) { FILE *fp; char *DATA = NULL; - int flength = 0; + size_t flength = 0; fp = fopen(FileName,"rt"); @@ -413,7 +413,7 @@ void OpenGLDisplay::render() } glFontBegin(&font); glPushMatrix(); - float fontscale = (float)theApp.surfaceSizeX / 100.0; + float fontscale = (float)theApp.surfaceSizeX / 100.0f; glScalef(fontscale, fontscale, fontscale); glColor4f(1.0f, 0.25f, 0.25f, 1.0f); glFontTextOut(buffer, (theApp.surfaceSizeX-(strlen(buffer)*11))/(fontscale*2), (theApp.surfaceSizeY-20)/fontscale, 0); @@ -427,7 +427,7 @@ void OpenGLDisplay::render() glFontBegin(&font); glPushMatrix(); - float fontscale = (float)theApp.surfaceSizeX / 100.0; + float fontscale = (float)theApp.surfaceSizeX / 100.0f; glScalef(fontscale, fontscale, fontscale); glColor4f(1.0f, 0.25f, 0.25f, 1.0f); glFontTextOut((char *)((const char *)theApp.screenMessageBuffer), (theApp.surfaceSizeX-(theApp.screenMessageBuffer.GetLength()*11))/(fontscale*2), (theApp.surfaceSizeY-40)/fontscale, 0); diff --git a/src/win32/SelectPlugin.cpp b/src/win32/SelectPlugin.cpp index 0b8232c9..d2ed5e45 100644 --- a/src/win32/SelectPlugin.cpp +++ b/src/win32/SelectPlugin.cpp @@ -74,7 +74,7 @@ BOOL SelectPlugin::OnInitDialog() m_comboPlugin.ResetContent(); - int nPluginCnt = EnumPlugins(); + size_t nPluginCnt = EnumPlugins(); if (nPluginCnt > 0) { for (int i = 0; i < rpiPool.size(); i++) @@ -95,7 +95,7 @@ BOOL SelectPlugin::OnInitDialog() // EXCEPTION: OCX Property Pages should return FALSE } -int SelectPlugin::EnumPlugins() +size_t SelectPlugin::EnumPlugins() { rpiPool.clear(); diff --git a/src/win32/SelectPlugin.h b/src/win32/SelectPlugin.h index c1ab0057..005fb60f 100644 --- a/src/win32/SelectPlugin.h +++ b/src/win32/SelectPlugin.h @@ -20,7 +20,7 @@ class SelectPlugin : public CDialog // Construction public: SelectPlugin(CWnd* pParent = NULL); // standard constructor - int EnumPlugins(); + size_t EnumPlugins(); bool GetPluginDesc(const char *sRpi, PluginDesc *pDesc); // Dialog Data