From 4e1e220e7118cd4896d58878c215300d00fff78f Mon Sep 17 00:00:00 2001 From: hrydgard Date: Fri, 12 Dec 2008 17:59:33 +0000 Subject: [PATCH] Cleanup, some BOOL removal. tested to work, unlike a certain other change :p git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1515 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/wxWidgets/build/msw/wx_adv.vcproj | 15 +- Externals/wxWidgets/build/msw/wx_base.vcproj | 20 +-- Externals/wxWidgets/build/msw/wx_core.vcproj | 18 +- Source/Core/Core/Core.vcproj | 10 +- Source/Core/Core/Src/Core.cpp | 10 +- .../Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp | 4 +- .../Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp | 1 - Source/Core/Core/Src/Plugins/Plugin_DSP.h | 4 +- Source/Core/Core/Src/Plugins/Plugin_DVD.cpp | 163 ------------------ Source/Core/Core/Src/Plugins/Plugin_DVD.h | 71 -------- Source/Core/Core/Src/Plugins/Plugin_Video.h | 2 +- Source/Core/VideoCommon/VideoCommon.vcproj | 4 +- Source/PluginSpecs/CommonTypes.h | 4 - Source/PluginSpecs/pluginspecs_video.h | 18 +- .../Plugin_PadSimple/Src/PadSimple.cpp | 6 - .../Plugin_nJoy_SDL/Plugin_nJoy_SDL.vcproj | 8 +- Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp | 8 - .../Plugins/Plugin_nJoy_Testing/Src/nJoy.cpp | 7 - 18 files changed, 59 insertions(+), 314 deletions(-) delete mode 100644 Source/Core/Core/Src/Plugins/Plugin_DVD.cpp delete mode 100644 Source/Core/Core/Src/Plugins/Plugin_DVD.h diff --git a/Externals/wxWidgets/build/msw/wx_adv.vcproj b/Externals/wxWidgets/build/msw/wx_adv.vcproj index d06e767ec3..6906b52ded 100644 --- a/Externals/wxWidgets/build/msw/wx_adv.vcproj +++ b/Externals/wxWidgets/build/msw/wx_adv.vcproj @@ -4,6 +4,7 @@ Version="9,00" Name="wxAdv28" ProjectGUID="{71B16F46-0B00-4EDA-B253-D6D9D03A215C}" + RootNamespace="wxAdv28" TargetFrameworkVersion="0" > @@ -46,7 +47,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="..\..\Include;..\..\Include\msvc;..\..\..\zlib;..\..\src\png" - PreprocessorDefinitions="WIN32;_LIB;__WXMSW__" + PreprocessorDefinitions="WIN32;_LIB;__WXMSW__;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0" MinimalRebuild="true" RuntimeLibrary="0" RuntimeTypeInfo="true" @@ -123,7 +124,7 @@ AdditionalOptions="/EHsc " Optimization="0" AdditionalIncludeDirectories="..\..\Include;..\..\Include\msvc;..\..\..\zlib;..\..\src\png" - PreprocessorDefinitions="WIN32;_LIB;__WXMSW__" + PreprocessorDefinitions="WIN32;_LIB;__WXMSW__;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0" MinimalRebuild="true" RuntimeLibrary="0" RuntimeTypeInfo="true" @@ -196,10 +197,10 @@ /> - - @@ -5804,6 +5800,10 @@ /> + + - - @@ -17028,6 +17024,10 @@ /> + + + + + + diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index fa20f5e654..33345bc715 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -70,17 +70,17 @@ namespace Core { // forwarding //void Callback_VideoRequestWindowSize(int _iWidth, int _iHeight, BOOL _bFullscreen); -void Callback_VideoLog(const TCHAR* _szMessage, BOOL _bDoBreak); +void Callback_VideoLog(const TCHAR* _szMessage, int _bDoBreak); void Callback_VideoCopiedToXFB(); void Callback_DSPLog(const TCHAR* _szMessage, int _v); -char * Callback_ISOName(void); +char *Callback_ISOName(void); void Callback_DSPInterrupt(); void Callback_PADLog(const TCHAR* _szMessage); void Callback_WiimoteLog(const TCHAR* _szMessage, int _v); void Callback_WiimoteInput(u16 _channelID, const void* _pData, u32 _Size); // For keyboard shortcuts. -void Callback_KeyPress(int key, BOOL shift, BOOL control); +void Callback_KeyPress(int key, bool shift, bool control); TPeekMessages Callback_PeekMessages = NULL; TUpdateFPSDisplay g_pUpdateFPSDisplay = NULL; @@ -474,7 +474,7 @@ void* GetWindowHandle() // __________________________________________________________________________________________________ // Callback_VideoLog // WARNING - THIS IS EXECUTED FROM VIDEO THREAD -void Callback_VideoLog(const TCHAR *_szMessage, BOOL _bDoBreak) +void Callback_VideoLog(const TCHAR *_szMessage, int _bDoBreak) { LOG(VIDEO, _szMessage); } @@ -565,7 +565,7 @@ char * Callback_ISOName(void) // __________________________________________________________________________________________________ // Called from ANY thread! -void Callback_KeyPress(int key, BOOL shift, BOOL control) +void Callback_KeyPress(int key, bool shift, bool control) { // 0x70 == VK_F1 if (key >= 0x70 && key < 0x79) { diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp index cf4e63e649..45afb6b051 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp @@ -282,7 +282,9 @@ s32 CWII_IPC_HLE_Device_fs::ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _B LOG(WII_IPC_FILEIO, "FS: GET STATS - no idea what we have to return here, prolly the free memory etc:)"); LOG(WII_IPC_FILEIO, " InBufferSize: %i OutBufferSize: %i", _BufferInSize, _BufferOutSize); - PanicAlert("GET_STATS"); + + // This happens in Tatsonuko vs Capcom. + //PanicAlert("GET_STATS"); /* Memory::Write_U32(Addr, a); Addr += 4; Memory::Write_U32(Addr, b); Addr += 4; diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp index d94daf5a6a..67c03f39d6 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp @@ -383,7 +383,6 @@ void CWII_IPC_HLE_WiiMote::SendACLFrame(u8* _pData, u32 _Size) // ---------------- void CWII_IPC_HLE_WiiMote::ShowStatus(const void* _pData) { - // Check if it's enabled bool LedsOn = Core::g_CoreStartupParameter.bWiiLeds; bool SpeakersOn = Core::g_CoreStartupParameter.bWiiSpeakers; diff --git a/Source/Core/Core/Src/Plugins/Plugin_DSP.h b/Source/Core/Core/Src/Plugins/Plugin_DSP.h index 252b70d0cf..e62f3aa87a 100644 --- a/Source/Core/Core/Src/Plugins/Plugin_DSP.h +++ b/Source/Core/Core/Src/Plugins/Plugin_DSP.h @@ -32,8 +32,8 @@ typedef void (__cdecl* TDllConfig)(HWND); typedef void (__cdecl* TDllDebugger)(HWND, bool); typedef void (__cdecl* TDSP_Initialize)(DSPInitialize); typedef void (__cdecl* TDSP_Shutdown)(); -typedef void (__cdecl* TDSP_WriteMailBox)(BOOL _CPUMailbox, unsigned short); -typedef unsigned short (__cdecl* TDSP_ReadMailBox)(BOOL _CPUMailbox); +typedef void (__cdecl* TDSP_WriteMailBox)(bool _CPUMailbox, unsigned short); +typedef unsigned short (__cdecl* TDSP_ReadMailBox)(bool _CPUMailbox); typedef unsigned short (__cdecl* TDSP_ReadControlRegister)(); typedef unsigned short (__cdecl* TDSP_WriteControlRegister)(unsigned short); typedef void (__cdecl* TDSP_Update)(int cycles); diff --git a/Source/Core/Core/Src/Plugins/Plugin_DVD.cpp b/Source/Core/Core/Src/Plugins/Plugin_DVD.cpp deleted file mode 100644 index e907d2ee6e..0000000000 --- a/Source/Core/Core/Src/Plugins/Plugin_DVD.cpp +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// This program 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, version 2.0. - -// This program 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 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "stdafx.h" -#include "Plugin_DVD.h" - - -namespace PluginDVD -{ - -//! Function Types -typedef void (__cdecl* TGetDllInfo) (PLUGIN_INFO*); -typedef void (__cdecl* TDllConfig) (HWND); -typedef void (__cdecl* TDVD_Initialize) (SDVDInitialize); -typedef void (__cdecl* TDVD_Shutdown) (); -typedef void (__cdecl* TDVD_SetISOFile) (const char*); -typedef BOOL (__cdecl* TDVD_GetISOName) (TCHAR*, int); -typedef BOOL (__cdecl* TDVD_ReadToPtr) (LPBYTE, u64, u64); -typedef BOOL (__cdecl* TDVD_IsValid) (); -typedef u32 (__cdecl* TDVD_Read32) (u64); - -//! Function Pointer -TGetDllInfo g_GetDllInfo = NULL; -TDllConfig g_DllConfig = NULL; -TDVD_Initialize g_DVD_Initialize = NULL; -TDVD_Shutdown g_DVD_Shutdown = NULL; -TDVD_SetISOFile g_DVD_SetISOFile = NULL; -TDVD_GetISOName g_DVD_GetISOName = NULL; -TDVD_ReadToPtr g_DVD_ReadToPtr = NULL; -TDVD_Read32 g_DVD_Read32 = NULL; -TDVD_IsValid g_DVD_IsValid = NULL; - -//! Library Instance -HINSTANCE g_hLibraryInstance = NULL; - -bool IsLoaded() -{ - return (g_hLibraryInstance != NULL); -} - -bool LoadPlugin(const char *_strFilename) -{ - UnloadPlugin(); - g_hLibraryInstance = LoadLibrary(_strFilename); - - if (g_hLibraryInstance) - { - g_GetDllInfo = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "GetDllInfo")); - g_DllConfig = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DllConfig")); - g_DVD_Initialize = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_Initialize")); - g_DVD_Shutdown = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_Shutdown")); - g_DVD_SetISOFile = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_SetISOFile")); - g_DVD_GetISOName = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_GetISOName")); - g_DVD_ReadToPtr = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_ReadToPtr")); - g_DVD_Read32 = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_Read32")); - g_DVD_IsValid = reinterpret_cast (GetProcAddress(g_hLibraryInstance, "DVD_IsValid")); - - if ((g_GetDllInfo != NULL) && - (g_DllConfig != NULL) && - (g_DVD_Initialize != NULL) && - (g_DVD_Shutdown != NULL) && - (g_DVD_SetISOFile != NULL) && - (g_DVD_GetISOName != NULL) && - (g_DVD_ReadToPtr != NULL) && - (g_DVD_IsValid != NULL) && - (g_DVD_Read32 != NULL)) - { - return true; - } - else - { - UnloadPlugin(); - return false; - } - } - - return false; -} - -void UnloadPlugin() -{ - // Set Functions to NULL - g_GetDllInfo = NULL; - g_DllConfig = NULL; - g_DVD_Initialize = NULL; - g_DVD_Shutdown = NULL; - g_DVD_SetISOFile = NULL; - g_DVD_Read32 = NULL; - g_DVD_ReadToPtr = NULL; - g_DVD_IsValid = NULL; - - // Unload library - if (g_hLibraryInstance != NULL) - { - FreeLibrary(g_hLibraryInstance); - g_hLibraryInstance = NULL; - } -} - -// -// --- Plugin Functions --- -// - -void GetDllInfo(PLUGIN_INFO* _PluginInfo) -{ - g_GetDllInfo(_PluginInfo); -} - -void DllConfig(HWND _hParent) -{ - g_DllConfig(_hParent); -} - -void DVD_Initialize(SDVDInitialize _DVDInitialize) -{ - g_DVD_Initialize(_DVDInitialize); -} - -void DVD_Shutdown() -{ - g_DVD_Shutdown(); -} - -bool DVD_ReadToPtr(LPBYTE ptr, u64 _dwOffset, u64 _dwLength) -{ - return (g_DVD_ReadToPtr(ptr, _dwOffset, _dwLength) == TRUE) ? true : false; -} - -bool DVD_IsValid() -{ - return (g_DVD_IsValid() == TRUE) ? true : false; -} - -u32 DVD_Read32(u64 _dwOffset) -{ - return g_DVD_Read32(_dwOffset); -} - -void DVD_SetISOFile(const char* _szFilename) -{ - g_DVD_SetISOFile(_szFilename); -} - -BOOL DVD_GetISOName(TCHAR * _szFilename, int maxlen) -{ - return g_DVD_GetISOName(_szFilename, maxlen); -} - -} // end of namespace PluginDVD \ No newline at end of file diff --git a/Source/Core/Core/Src/Plugins/Plugin_DVD.h b/Source/Core/Core/Src/Plugins/Plugin_DVD.h deleted file mode 100644 index 4e9955f524..0000000000 --- a/Source/Core/Core/Src/Plugins/Plugin_DVD.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// This program 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, version 2.0. - -// This program 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 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifndef _PLUGIN_DVD_H -#define _PLUGIN_DVD_H - -#include "PluginSpecs_DVD.h" - -namespace PluginDVD -{ - -//! IsLoaded -bool IsLoaded(); - -//! LoadPlugin -bool LoadPlugin(const char *_strFilename); - -//! UnloadPlugin -void UnloadPlugin(); - -// -// --- Plugin Functions --- -// - -//! GetDllInfo -void GetDllInfo(PLUGIN_INFO* _PluginInfo) ; - -//! DllConfig -void DllConfig(HWND _hParent); - -//! DVD_Initialize -void DVD_Initialize(SDVDInitialize _DVDInitialize); - -//! DVD_Shutdown -void DVD_Shutdown(); - -//! SetISOFile -void DVD_SetISOFile(const char* _szFilename); - -//! GetISOName -BOOL DVD_GetISOName(TCHAR * _szFilename, int maxlen); - -//! DVDReadToPtr -bool DVD_ReadToPtr(LPBYTE ptr, u64 _dwOffset, u64 _dwLength); - -//! DVD_IsValid -bool DVD_IsValid(); - -//! DVDRead32 -u32 DVD_Read32(u64 _dwOffset); - -//! SaveLoadState -u32 SaveLoadState(char *ptr, BOOL save); - -} // end of namespace PluginDVD - -#endif diff --git a/Source/Core/Core/Src/Plugins/Plugin_Video.h b/Source/Core/Core/Src/Plugins/Plugin_Video.h index 285b6cf65e..e8359e2ee4 100644 --- a/Source/Core/Core/Src/Plugins/Plugin_Video.h +++ b/Source/Core/Core/Src/Plugins/Plugin_Video.h @@ -39,7 +39,7 @@ typedef void (__cdecl* TVideo_Prepare)(); typedef void (__cdecl* TVideo_Shutdown)(); typedef void (__cdecl* TVideo_SendFifoData)(u8*,u32); typedef void (__cdecl* TVideo_UpdateXFB)(u8*, u32, u32, s32); -typedef BOOL (__cdecl* TVideo_Screenshot)(TCHAR*); +typedef bool (__cdecl* TVideo_Screenshot)(const char* filename); typedef void (__cdecl* TVideo_EnterLoop)(); typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds); typedef void (__cdecl* TVideo_DoState)(unsigned char **ptr, int mode); diff --git a/Source/Core/VideoCommon/VideoCommon.vcproj b/Source/Core/VideoCommon/VideoCommon.vcproj index 35e29e4e42..0096e445f5 100644 --- a/Source/Core/VideoCommon/VideoCommon.vcproj +++ b/Source/Core/VideoCommon/VideoCommon.vcproj @@ -110,7 +110,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../../Core/Common/Src;../../PluginSpecs" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_SECURE_SCL=0;_LIB;__WXMSW__;wxUSE_BASE=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -371,7 +371,7 @@