mirror of https://github.com/PCSX2/pcsx2.git
clean (some) gdb warning: round 1
* use svnrev.h on linux too * replace sprintf_s with snprintf (hope it still compile on Windows) * init integer with 0 instead of NULL * various int -> u32/uint32/uint on for loop index * remove a couple of unused variable * init few variable * disable unused warning results git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5683 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
ca1edbf2cb
commit
3c7167be50
|
@ -98,10 +98,15 @@ include(BuildParameters)
|
|||
include(SearchForStuff)
|
||||
include(SelectPcsx2Plugins)
|
||||
|
||||
# Must be done after SearchForStuff
|
||||
write_svnrev_h()
|
||||
|
||||
# add additional project-wide include directories
|
||||
include_directories(${PROJECT_SOURCE_DIR}/common/include
|
||||
${PROJECT_SOURCE_DIR}/common/include/Utilities
|
||||
${PROJECT_SOURCE_DIR}/common/include/x86emitter
|
||||
# File generated by Cmake
|
||||
${CMAKE_BINARY_DIR}/common/include
|
||||
# WORKAROUND Some issue with multiarch on Debian/Ubuntu
|
||||
/usr/include/i386-linux-gnu
|
||||
)
|
||||
|
|
|
@ -93,7 +93,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
|
|||
#-------------------------------------------------------------------------------
|
||||
# Set some default compiler flags
|
||||
#-------------------------------------------------------------------------------
|
||||
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes")
|
||||
set(DEFAULT_WARNINGS "-Wno-write-strings -Wno-format -Wno-unused-parameter -Wno-unused-value -Wstrict-aliasing -Wno-unused-function -Wno-attributes -Wno-unused-result")
|
||||
set(DEFAULT_GCC_FLAG "-m32 -msse -msse2 -march=i686 -pthread ${DEFAULT_WARNINGS}")
|
||||
set(DEFAULT_CPP_FLAG "${DEFAULT_GCC_FLAG} -Wno-invalid-offsetof")
|
||||
|
||||
|
|
|
@ -36,3 +36,17 @@ function(detectOperatingSystem)
|
|||
set(Windows TRUE PARENT_SCOPE)
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
endfunction(detectOperatingSystem)
|
||||
|
||||
function(write_svnrev_h)
|
||||
# you must have both svn client executable and a source that contains svn metadata
|
||||
if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||
# execute subversion
|
||||
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
||||
|
||||
# write svnrev.h
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
||||
else()
|
||||
# write svnrev.h
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/common/include/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
|
@ -12,7 +12,6 @@ set(CommonFlags
|
|||
# Disable this optimization for the moment
|
||||
-fno-omit-frame-pointer
|
||||
# END GCC-4.6
|
||||
-DLINUX_PRINT_SVN_NUMBER
|
||||
-pthread
|
||||
-fvisibility=hidden
|
||||
-fno-guess-branch-probability
|
||||
|
@ -102,18 +101,6 @@ if(PACKAGE_MODE)
|
|||
set(Output pcsx2)
|
||||
endif(PACKAGE_MODE)
|
||||
|
||||
# you must have both svn client executable and a source that contains svn metadata
|
||||
if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||
# execute subversion
|
||||
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
||||
|
||||
# write svnrev.h
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
||||
else(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||
# write svnrev.h
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
||||
endif(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||
|
||||
# Main pcsx2 source
|
||||
set(pcsx2Sources
|
||||
Cache.cpp
|
||||
|
@ -649,7 +636,6 @@ endif(MacOSX)
|
|||
include_directories(.
|
||||
gui
|
||||
x86
|
||||
${CMAKE_BINARY_DIR}/pcsx2
|
||||
${CMAKE_BINARY_DIR}/pcsx2/gui
|
||||
)
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ void eeMemoryReserve::Reset()
|
|||
// Dynarec versions of VUs
|
||||
vu0_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,0);
|
||||
vu1_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,1);
|
||||
vu1_data_mem = (1||THREAD_VU1) ? vtlb_RegisterHandlerTempl1(vuData,1) : NULL;
|
||||
vu1_data_mem = (1||THREAD_VU1) ? vtlb_RegisterHandlerTempl1(vuData,1) : 0;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// IOP's "secret" Hardware Register mapping, accessible from the EE (and meant for use
|
||||
|
|
|
@ -26,9 +26,7 @@
|
|||
#include "Utilities/ScopedPtr.h"
|
||||
#include "Utilities/pxStreams.h"
|
||||
|
||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
SysPluginBindings SysPlugins;
|
||||
|
||||
|
|
|
@ -92,16 +92,6 @@ typedef FnType_Void* Fnptr_Void;
|
|||
// Compiler/OS specific macros and defines
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// Linux isn't set up for svn version numbers yet.
|
||||
#if defined(__LINUX__) && !defined(LINUX_PRINT_SVN_NUMBER)
|
||||
#if !defined(SVN_REV)
|
||||
# define SVN_REV 0
|
||||
#endif
|
||||
#if !defined(SVN_MODS)
|
||||
# define SVN_MODS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
# define strnicmp _strnicmp
|
||||
|
|
|
@ -150,9 +150,7 @@ void SysOutOfMemory_EmergencyResponse(uptr blocksize)
|
|||
}
|
||||
|
||||
|
||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
const Pcsx2Config EmuConfig;
|
||||
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#include <wx/iconbndl.h>
|
||||
|
||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
|
||||
|
|
|
@ -29,9 +29,7 @@ struct Component_FileMcd;
|
|||
#include "System.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
#if _MSC_VER || defined(LINUX_PRINT_SVN_NUMBER)
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
#include <wx/ffile.h>
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ protected:
|
|||
|
||||
public:
|
||||
BaseBlocks() :
|
||||
recompiler( NULL )
|
||||
recompiler(0)
|
||||
, blocks(0)
|
||||
{
|
||||
blocks.reserve(0x4000);
|
||||
|
|
|
@ -322,7 +322,7 @@ EXPORT_C_(s32) CDVDgetTOC(void* toc)
|
|||
|
||||
if (layer1start != -2 && iso->blocks >= 0x300000)
|
||||
{
|
||||
int off = iso->blockofs;
|
||||
//int off = iso->blockofs;
|
||||
|
||||
// dual sided
|
||||
tocBuff[ 0] = 0x24;
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "CDVD.h"
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
static char libraryName[256];
|
||||
|
||||
|
@ -28,12 +26,8 @@ const unsigned char build = 6;
|
|||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s( libraryName, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
snprintf( libraryName, 255, "CDVDnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
return libraryName;
|
||||
#else
|
||||
return "CDVDnull Driver";
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibType()
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
using namespace std;
|
||||
|
||||
#include "FW.h"
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
const u8 version = PS2E_FW_VERSION;
|
||||
const u8 revision = 0;
|
||||
|
@ -65,12 +63,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
|||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s( libraryName, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
snprintf( libraryName, 255, "FWnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
return libraryName;
|
||||
#else
|
||||
return "FWnull Driver";
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||
|
@ -131,7 +125,6 @@ void PHYWrite()
|
|||
void PHYRead()
|
||||
{
|
||||
u8 reg = (PHYACC >> 24) & 0xf;
|
||||
u8 data = (PHYACC >> 16) & 0xff;
|
||||
|
||||
PHYACC &= ~0x80000000;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ GPUState::GPUState()
|
|||
{
|
||||
memset(m_status, 0, sizeof(m_status));
|
||||
|
||||
for(int i = 0; i < countof(m_fpGPUStatusCommandHandlers); i++)
|
||||
for(uint32 i = 0; i < countof(m_fpGPUStatusCommandHandlers); i++)
|
||||
{
|
||||
m_fpGPUStatusCommandHandlers[i] = &GPUState::SCH_Null;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,9 @@ static int s_renderer = -1;
|
|||
static bool s_framelimit = true;
|
||||
static bool s_vsync = false;
|
||||
static bool s_exclusive = true;
|
||||
#ifdef _WINDOWS
|
||||
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
||||
#endif
|
||||
|
||||
EXPORT_C_(uint32) PS2EgetLibType()
|
||||
{
|
||||
|
@ -439,7 +441,7 @@ EXPORT_C_(int) GSopen(void** dsp, char* title, int mt)
|
|||
XCloseDisplay(display);
|
||||
*/
|
||||
|
||||
int renderer;
|
||||
int renderer = 0;
|
||||
|
||||
// Legacy GUI expects to acquire vsync from the configuration files.
|
||||
|
||||
|
@ -1456,8 +1458,6 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer)
|
|||
|
||||
fread(regs, 0x2000, 1, fp);
|
||||
|
||||
long start = ftell(fp);
|
||||
|
||||
GSvsync(1);
|
||||
|
||||
struct Packet {uint8 type, param; uint32 size, addr; vector<uint8> buff;};
|
||||
|
|
|
@ -531,7 +531,7 @@ CRC::Game CRC::Lookup(uint32 crc)
|
|||
printf( "GSdx: CrcHacksExclusions: %s\n", exclusions.c_str() );
|
||||
|
||||
int crcDups = 0;
|
||||
for(int i = 0; i < countof(m_games); i++)
|
||||
for(uint32 i = 0; i < countof(m_games); i++)
|
||||
{
|
||||
if( !IsCrcExcluded( exclusions, m_games[i].crc ) ){
|
||||
if(m_map[m_games[i].crc]){
|
||||
|
|
|
@ -226,7 +226,7 @@ void GSDevice::Merge(GSTexture* st[2], GSVector4* sr, GSVector4* dr, const GSVec
|
|||
{
|
||||
GSTexture* tex[2] = {NULL, NULL};
|
||||
|
||||
for(int i = 0; i < countof(tex); i++)
|
||||
for(uint32 i = 0; i < countof(tex); i++)
|
||||
{
|
||||
if(st[i] != NULL)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ void GSDevice::Merge(GSTexture* st[2], GSVector4* sr, GSVector4* dr, const GSVec
|
|||
|
||||
DoMerge(tex, sr, m_merge, dr, slbg, mmod, c);
|
||||
|
||||
for(int i = 0; i < countof(tex); i++)
|
||||
for(uint32 i = 0; i < countof(tex); i++)
|
||||
{
|
||||
if(tex[i] != st[i])
|
||||
{
|
||||
|
|
|
@ -116,89 +116,89 @@ GSLocalMemory::GSLocalMemory()
|
|||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset32); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset32); x++)
|
||||
{
|
||||
rowOffset32[x] = (int)PixelAddress32(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset32Z); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset32Z); x++)
|
||||
{
|
||||
rowOffset32Z[x] = (int)PixelAddress32Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress32Z(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset16); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset16); x++)
|
||||
{
|
||||
rowOffset16[x] = (int)PixelAddress16(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset16S); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset16S); x++)
|
||||
{
|
||||
rowOffset16S[x] = (int)PixelAddress16S(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16S(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset16Z); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset16Z); x++)
|
||||
{
|
||||
rowOffset16Z[x] = (int)PixelAddress16Z(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16Z(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset16SZ); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset16SZ); x++)
|
||||
{
|
||||
rowOffset16SZ[x] = (int)PixelAddress16SZ(x & 0x7ff, 0, 0, 32) - (int)PixelAddress16SZ(0, 0, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset8[0]); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset8[0]); x++)
|
||||
{
|
||||
rowOffset8[0][x] = (int)PixelAddress8(x & 0x7ff, 0, 0, 32) - (int)PixelAddress8(0, 0, 0, 32);
|
||||
rowOffset8[1][x] = (int)PixelAddress8(x & 0x7ff, 2, 0, 32) - (int)PixelAddress8(0, 2, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(rowOffset4[0]); x++)
|
||||
for(uint32 x = 0; x < countof(rowOffset4[0]); x++)
|
||||
{
|
||||
rowOffset4[0][x] = (int)PixelAddress4(x & 0x7ff, 0, 0, 32) - (int)PixelAddress4(0, 0, 0, 32);
|
||||
rowOffset4[1][x] = (int)PixelAddress4(x & 0x7ff, 2, 0, 32) - (int)PixelAddress4(0, 2, 0, 32);
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset32); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset32); x++)
|
||||
{
|
||||
blockOffset32[x] = (short)((int)BlockNumber32(x << 3, 0, 0, 32) - (int)BlockNumber32(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset32Z); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset32Z); x++)
|
||||
{
|
||||
blockOffset32Z[x] = (short)((int)BlockNumber32Z(x << 3, 0, 0, 32) - (int)BlockNumber32Z(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset16); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset16); x++)
|
||||
{
|
||||
blockOffset16[x] = (short)((int)BlockNumber16(x << 3, 0, 0, 32) - (int)BlockNumber16(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset16S); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset16S); x++)
|
||||
{
|
||||
blockOffset16S[x] = (short)((int)BlockNumber16S(x << 3, 0, 0, 32) - (int)BlockNumber16S(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset16Z); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset16Z); x++)
|
||||
{
|
||||
blockOffset16Z[x] = (short)((int)BlockNumber16Z(x << 3, 0, 0, 32) - (int)BlockNumber16Z(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset16SZ); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset16SZ); x++)
|
||||
{
|
||||
blockOffset16SZ[x] = (short)((int)BlockNumber16SZ(x << 3, 0, 0, 32) - (int)BlockNumber16SZ(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset8); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset8); x++)
|
||||
{
|
||||
blockOffset8[x] = (short)((int)BlockNumber8(x << 3, 0, 0, 32) - (int)BlockNumber8(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int x = 0; x < countof(blockOffset4); x++)
|
||||
for(uint32 x = 0; x < countof(blockOffset4); x++)
|
||||
{
|
||||
blockOffset4[x] = (short)((int)BlockNumber4(x << 3, 0, 0, 32) - (int)BlockNumber4(0, 0, 0, 32));
|
||||
}
|
||||
|
||||
for(int i = 0; i < countof(m_psm); i++)
|
||||
for(uint32 i = 0; i < countof(m_psm); i++)
|
||||
{
|
||||
m_psm[i].pa = &GSLocalMemory::PixelAddress32;
|
||||
m_psm[i].bn = &GSLocalMemory::BlockNumber32;
|
||||
|
@ -408,7 +408,7 @@ GSLocalMemory::GSLocalMemory()
|
|||
m_psm[PSM_PSMT8].pal = m_psm[PSM_PSMT8H].pal = 256;
|
||||
m_psm[PSM_PSMT4].pal = m_psm[PSM_PSMT4HL].pal = m_psm[PSM_PSMT4HH].pal = 16;
|
||||
|
||||
for(int i = 0; i < countof(m_psm); i++) m_psm[i].fmt = 3;
|
||||
for(uint32 i = 0; i < countof(m_psm); i++) m_psm[i].fmt = 3;
|
||||
m_psm[PSM_PSMCT32].fmt = m_psm[PSM_PSMZ32].fmt = 0;
|
||||
m_psm[PSM_PSMCT24].fmt = m_psm[PSM_PSMZ24].fmt = 1;
|
||||
m_psm[PSM_PSMCT16].fmt = m_psm[PSM_PSMZ16].fmt = 2;
|
||||
|
|
|
@ -58,7 +58,7 @@ void GSPerfMon::Update()
|
|||
{
|
||||
if(m_count > 0)
|
||||
{
|
||||
for(int i = 0; i < countof(m_counters); i++)
|
||||
for(uint32 i = 0; i < countof(m_counters); i++)
|
||||
{
|
||||
m_stats[i] = m_counters[i] / m_count;
|
||||
}
|
||||
|
|
|
@ -554,7 +554,6 @@ bool GSRendererHW::OI_GodOfWar2(GSTexture* rt, GSTexture* ds, GSTextureCache::So
|
|||
bool GSRendererHW::OI_SimpsonsGame(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
||||
{
|
||||
uint32 FBP = m_context->FRAME.Block();
|
||||
uint32 FBW = m_context->FRAME.FBW;
|
||||
uint32 FPSM = m_context->FRAME.PSM;
|
||||
|
||||
if((FBP == 0x01500 || FBP == 0x01800) && FPSM == PSM_PSMZ24) //0x1800 pal, 0x1500 ntsc
|
||||
|
@ -636,7 +635,6 @@ bool GSRendererHW::OI_SpidermanWoS(GSTexture* rt, GSTexture* ds, GSTextureCache:
|
|||
bool GSRendererHW::OI_TyTasmanianTiger(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
|
||||
{
|
||||
uint32 FBP = m_context->FRAME.Block();
|
||||
uint32 FBW = m_context->FRAME.FBW;
|
||||
uint32 FPSM = m_context->FRAME.PSM;
|
||||
|
||||
if((FBP == 0x02800 || FBP == 0x02BC0) && FPSM == PSM_PSMCT24) //0x2800 pal, 0x2bc0 ntsc
|
||||
|
|
|
@ -178,7 +178,7 @@ void GSRendererOGL::SetupIA()
|
|||
|
||||
dev->IASetIndexBuffer(m_index.buff, m_index.tail);
|
||||
|
||||
GLenum t;
|
||||
GLenum t = 0;
|
||||
|
||||
switch(m_vt.m_primclass)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ GSRendererSW::~GSRendererSW()
|
|||
{
|
||||
delete m_tc;
|
||||
|
||||
for(int i = 0; i < countof(m_texture); i++)
|
||||
for(uint32 i = 0; i < countof(m_texture); i++)
|
||||
{
|
||||
delete m_texture[i];
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void GSRendererSW::VSync(int field)
|
|||
|
||||
void GSRendererSW::ResetDevice()
|
||||
{
|
||||
for(int i = 0; i < countof(m_texture); i++)
|
||||
for(uint32 i = 0; i < countof(m_texture); i++)
|
||||
{
|
||||
delete m_texture[i];
|
||||
|
||||
|
@ -445,7 +445,7 @@ void GSRendererSW::Draw()
|
|||
{
|
||||
int n = GSUtil::GetVertexCount(PRIM->PRIM);
|
||||
|
||||
for(int i = 0, j = 0; i < m_index.tail; i += n, j++)
|
||||
for(uint32 i = 0, j = 0; i < m_index.tail; i += n, j++)
|
||||
{
|
||||
for(int k = 0; k < n; k++)
|
||||
{
|
||||
|
|
|
@ -1177,7 +1177,7 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0, const GSO
|
|||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < countof(m_pages); i++)
|
||||
for(uint32 i = 0; i < countof(m_pages); i++)
|
||||
{
|
||||
if(uint32 p = m_pages[i])
|
||||
{
|
||||
|
|
|
@ -192,8 +192,8 @@ bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch)
|
|||
EnableUnit(4);
|
||||
|
||||
// pitch is in byte wherease GL_UNPACK_ROW_LENGTH is in pixel
|
||||
GLenum format;
|
||||
GLenum type;
|
||||
GLenum format = GL_RGBA;
|
||||
GLenum type = GL_UNSIGNED_BYTE;
|
||||
switch (m_format) {
|
||||
case GL_RGBA8:
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#include <errno.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
#include "Pad.h"
|
||||
|
||||
const u8 version = PS2E_PAD_VERSION;
|
||||
|
@ -43,13 +41,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
|||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s( libraryName, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
snprintf( libraryName, 255, "Padnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
return libraryName;
|
||||
#else
|
||||
return "Padnull Driver";
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
#include "USB.h"
|
||||
string s_strIniPath="inis";
|
||||
string s_strLogPath="logs";
|
||||
|
@ -59,12 +57,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
|||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s( libraryName, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
snprintf( libraryName, 255, "USBnull Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
return libraryName;
|
||||
#else
|
||||
return "USBnull Driver";
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
using namespace std;
|
||||
|
||||
#include "DEV9.h"
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
const unsigned char version = PS2E_DEV9_VERSION;
|
||||
const unsigned char revision = 0;
|
||||
|
@ -76,12 +74,8 @@ EXPORT_C_(u32) PS2EgetLibType()
|
|||
|
||||
EXPORT_C_(char*) PS2EgetLibName()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s( libraryName, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
snprintf( libraryName, 255, "DEV9null Driver r%d%s",SVN_REV, SVN_MODS ? "m" : "");
|
||||
return libraryName;
|
||||
#else
|
||||
return "DEV9null Driver";
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
||||
|
|
|
@ -412,8 +412,8 @@ void joy_changed(GtkComboBox *box, gpointer user_data)
|
|||
// 3 : use new joy with fresh key binding
|
||||
|
||||
// unassign every joystick with this pad
|
||||
for (int i = 0; i < 2; ++i)
|
||||
if (joyid == conf->get_joyid(i)) conf->set_joyid(i, -1);
|
||||
for (u32 i = 0; i < 2; ++i)
|
||||
if (joyid == (int)conf->get_joyid(i)) conf->set_joyid(i, -1);
|
||||
|
||||
conf->set_joyid(current_pad, joyid);
|
||||
}
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
#include "onepad.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include "svnrev.h"
|
||||
|
||||
#ifdef __LINUX__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
PADconf* conf;
|
||||
|
@ -133,7 +131,6 @@ static int padVibF[2][4];
|
|||
|
||||
static void InitLibraryName()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef PUBLIC
|
||||
|
||||
// Public Release!
|
||||
|
@ -141,23 +138,12 @@ static void InitLibraryName()
|
|||
|
||||
strcpy(libraryName, "OnePAD");
|
||||
|
||||
# elif defined( SVN_REV_UNKNOWN )
|
||||
|
||||
// Unknown revision.
|
||||
// Output a name that includes devbuild status but not
|
||||
// subversion revision tags:
|
||||
|
||||
strcpy(libraryName, "OnePAD"
|
||||
# ifdef PCSX2_DEBUG
|
||||
"-Debug"
|
||||
# endif
|
||||
);
|
||||
#else
|
||||
|
||||
// Use TortoiseSVN's SubWCRev utility's output
|
||||
// to label the specific revision:
|
||||
|
||||
sprintf_s(libraryName, "OnePAD r%d%s"
|
||||
snprintf(libraryName, 255, "OnePAD r%d%s"
|
||||
# ifdef PCSX2_DEBUG
|
||||
"-Debug"
|
||||
# else
|
||||
|
@ -167,15 +153,6 @@ static void InitLibraryName()
|
|||
SVN_MODS ? "m" : ""
|
||||
);
|
||||
#endif
|
||||
#else
|
||||
// I'll fix up SVN support later. --arcum42
|
||||
|
||||
strcpy(libraryName, "OnePAD"
|
||||
# ifdef PCSX2_DEBUG
|
||||
"-Debug"
|
||||
# endif
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibType()
|
||||
|
|
|
@ -561,7 +561,7 @@ static __forceinline StereoOut32 MixVoice( uint coreidx, uint voiceidx )
|
|||
{
|
||||
UpdatePitch( coreidx, voiceidx );
|
||||
|
||||
s32 Value;
|
||||
s32 Value = 0;
|
||||
|
||||
if( vc.Noise )
|
||||
Value = GetNoiseValues( thiscore, voiceidx );
|
||||
|
@ -619,8 +619,8 @@ static __forceinline StereoOut32 MixVoice( uint coreidx, uint voiceidx )
|
|||
// Continue processing voice, even if it's "off". Or else we miss interrupts! (Fatal Frame engine died because of this.)
|
||||
if (NEVER_SKIP_VOICES
|
||||
|| (*GetMemPtr(vc.NextA & 0xFFFF8) >> 8 & 3) != 3 || vc.LoopStartA != (vc.NextA & ~7) // not in a tight loop
|
||||
|| Cores[0].IRQEnable && (Cores[0].IRQA & ~7) == vc.LoopStartA // or should be interrupting regularly
|
||||
|| Cores[1].IRQEnable && (Cores[1].IRQA & ~7) == vc.LoopStartA
|
||||
|| (Cores[0].IRQEnable && (Cores[0].IRQA & ~7) == vc.LoopStartA) // or should be interrupting regularly
|
||||
|| (Cores[1].IRQEnable && (Cores[1].IRQA & ~7) == vc.LoopStartA)
|
||||
|| !(thiscore.Regs.ENDX & 1 << voiceidx)) // or isn't currently flagged as having passed the endpoint
|
||||
{
|
||||
UpdatePitch(coreidx, voiceidx);
|
||||
|
|
|
@ -20,10 +20,7 @@
|
|||
#include "Dma.h"
|
||||
#include "Dialogs.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
|
||||
// PCSX2 expects ASNI, not unicode, so this MUST always be char...
|
||||
static char libraryName[256];
|
||||
|
@ -87,7 +84,7 @@ static void InitLibraryName()
|
|||
// Use TortoiseSVN's SubWCRev utility's output
|
||||
// to label the specific revision:
|
||||
|
||||
sprintf_s( libraryName, "SPU2-X r%d%s"
|
||||
snprintf( libraryName, 255, "SPU2-X r%d%s"
|
||||
#ifdef DEBUG_FAST
|
||||
"-Debug"
|
||||
#elif defined( PCSX2_DEBUG )
|
||||
|
@ -105,7 +102,7 @@ static void InitLibraryName()
|
|||
|
||||
}
|
||||
|
||||
static bool cpu_detected = false;
|
||||
//static bool cpu_detected = false;
|
||||
|
||||
static bool CheckSSE()
|
||||
{
|
||||
|
@ -519,8 +516,6 @@ EXPORT_C_(void) SPU2setClockPtr(u32 *ptr)
|
|||
cyclePtr = ptr;
|
||||
}
|
||||
|
||||
static bool numpad_plus = false, numpad_plus_old = false;
|
||||
|
||||
#ifdef DEBUG_KEYS
|
||||
static u32 lastTicks;
|
||||
static bool lState[6];
|
||||
|
|
|
@ -134,7 +134,7 @@ StereoOut32 V_Core::ReadInput()
|
|||
|
||||
InputPosRead++;
|
||||
|
||||
if (AutoDMACtrl & Index + 1 && (InputPosRead == 0x100 || InputPosRead == 0x200))
|
||||
if (AutoDMACtrl & (Index + 1) && (InputPosRead == 0x100 || InputPosRead == 0x200))
|
||||
{
|
||||
#ifdef ENABLE_NEW_IOPDMA_SPU2
|
||||
// WARNING: Assumes this to be in the same thread as the dmas
|
||||
|
|
|
@ -178,7 +178,6 @@ public:
|
|||
void* infoPtr = NULL;
|
||||
|
||||
const PaDeviceInfo * devinfo = Pa_GetDeviceInfo(deviceIndex);
|
||||
const PaHostApiInfo * apiinfo = Pa_GetHostApiInfo(devinfo->hostApi);
|
||||
|
||||
int speakers;
|
||||
switch(numSpeakers) // speakers = (numSpeakers + 1) *2; ?
|
||||
|
|
|
@ -426,8 +426,6 @@ static void CvtPacketToInt( StereoOut32* srcdest, uint size )
|
|||
|
||||
void SndBuffer::timeStretchWrite()
|
||||
{
|
||||
bool progress = false;
|
||||
|
||||
// data prediction helps keep the tempo adjustments more accurate.
|
||||
// The timestretcher returns packets in belated "clump" form.
|
||||
// Meaning that most of the time we'll get nothing back, and then
|
||||
|
@ -448,7 +446,6 @@ void SndBuffer::timeStretchWrite()
|
|||
|
||||
CvtPacketToInt( sndTempBuffer, tempProgress );
|
||||
_WriteSamples( sndTempBuffer, tempProgress );
|
||||
progress = true;
|
||||
}
|
||||
|
||||
#ifdef SPU2X_USE_OLD_STRETCHER
|
||||
|
|
|
@ -185,7 +185,7 @@ EXPORT_C_(void) GSsetGameCRC(int crc, int options)
|
|||
|
||||
if (CRCValueChanged && (crc != 0))
|
||||
{
|
||||
for (int i = 0; i < GAME_INFO_INDEX; i++)
|
||||
for (u32 i = 0; i < GAME_INFO_INDEX; i++)
|
||||
{
|
||||
if (crc_game_list[i].crc == crc)
|
||||
{
|
||||
|
@ -680,8 +680,6 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
|
|||
|
||||
fread(regs, 0x2000, 1, fp);
|
||||
|
||||
long start = ftell(fp);
|
||||
|
||||
GSvsync(1);
|
||||
|
||||
list<Packet*> packets;
|
||||
|
@ -769,7 +767,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
|
|||
switch(p->param)
|
||||
{
|
||||
//case 0: GSgifTransfer1((u32*)&p->buff[0], p->addr); break;
|
||||
case 0: _GSgifTransfer<0>(&p->buff[0], p->real_size); break;
|
||||
case 0: _GSgifTransfer<0>((u32*)&p->buff[0], p->real_size); break;
|
||||
case 1: GSgifTransfer2((u32*)&p->buff[0], p->real_size); break;
|
||||
case 2: GSgifTransfer3((u32*)&p->buff[0], p->real_size); break;
|
||||
case 3: GSgifTransfer((u32*)&p->buff[0], p->real_size); break;
|
||||
|
|
|
@ -243,7 +243,7 @@ CMemoryTarget* CMemoryTargetMngr::SearchExistTarget(int start, int end, int clut
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CMemoryTarget* CMemoryTargetMngr::ClearedTargetsSearch(int fmt, int widthmult, int channels, int height)
|
||||
CMemoryTarget* CMemoryTargetMngr::ClearedTargetsSearch(u32 fmt, int widthmult, int channels, int height)
|
||||
{
|
||||
CMemoryTarget* targ = NULL;
|
||||
|
||||
|
|
|
@ -832,7 +832,7 @@ inline void AfterRendererAutoresetTargets()
|
|||
|
||||
int total = 0;
|
||||
|
||||
for (int i = 0; i < ArraySize(s_nResolveCounts); ++i) total += s_nResolveCounts[i];
|
||||
for (u32 i = 0; i < ArraySize(s_nResolveCounts); ++i) total += s_nResolveCounts[i];
|
||||
|
||||
if (total / ArraySize(s_nResolveCounts) > 3)
|
||||
{
|
||||
|
|
|
@ -566,7 +566,7 @@ bool ZZCreate(int _width, int _height)
|
|||
|
||||
if (!vb_buffer_allocated) {
|
||||
glGenBuffers((GLsizei)ArraySize(g_vboBuffers), g_vboBuffers);
|
||||
for (int i = 0; i < ArraySize(g_vboBuffers); ++i)
|
||||
for (u32 i = 0; i < ArraySize(g_vboBuffers); ++i)
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, g_vboBuffers[i]);
|
||||
glBufferData(GL_ARRAY_BUFFER, 0x100*sizeof(VertexGPU), NULL, GL_STREAM_DRAW);
|
||||
|
@ -809,7 +809,7 @@ void ZZDestroy()
|
|||
|
||||
if (pvs != NULL)
|
||||
{
|
||||
for (int i = 0; i < ArraySize(pvs); ++i)
|
||||
for (u32 i = 0; i < ArraySize(pvs); ++i)
|
||||
{
|
||||
SAFE_RELEASE_PROG(pvs[i]);
|
||||
}
|
||||
|
@ -817,7 +817,7 @@ void ZZDestroy()
|
|||
|
||||
if (ppsRegular != NULL)
|
||||
{
|
||||
for (int i = 0; i < ArraySize(ppsRegular); ++i)
|
||||
for (u32 i = 0; i < ArraySize(ppsRegular); ++i)
|
||||
{
|
||||
SAFE_RELEASE_PROG(ppsRegular[i].prog);
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ void ZZDestroy()
|
|||
|
||||
if (ppsTexture != NULL)
|
||||
{
|
||||
for (int i = 0; i < ArraySize(ppsTexture); ++i)
|
||||
for (u32 i = 0; i < ArraySize(ppsTexture); ++i)
|
||||
{
|
||||
SAFE_RELEASE_PROG(ppsTexture[i].prog);
|
||||
}
|
||||
|
|
|
@ -328,7 +328,7 @@ class CMemoryTargetMngr
|
|||
|
||||
CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut
|
||||
CMemoryTarget* SearchExistTarget(int start, int end, int clutsize, const tex0Info& tex0, int forcevalidate);
|
||||
CMemoryTarget* ClearedTargetsSearch(int fmt, int widthmult, int channels, int height);
|
||||
CMemoryTarget* ClearedTargetsSearch(u32 fmt, int widthmult, int channels, int height);
|
||||
int CompareTarget(list<CMemoryTarget>::iterator& it, const tex0Info& tex0, int clutsize);
|
||||
|
||||
void Destroy(); // destroy all targs
|
||||
|
|
Loading…
Reference in New Issue