From 53ac6d98d88ce3e043e62e5c71bb300aae8771b1 Mon Sep 17 00:00:00 2001 From: latot Date: Sat, 9 Jan 2016 16:49:20 -0300 Subject: [PATCH] Little things back 1 other little change, join 2 in 1 --- Core/FileSystems/ISOFileSystem.cpp | 3 +-- Core/HLE/sceAtrac.cpp | 4 ++-- Core/HLE/sceNetAdhoc.cpp | 8 ++++---- UI/MiscScreens.cpp | 6 ++++-- ext/native/ext/glew/glew.c | 6 +++--- ext/native/tools/atlastool.cpp | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index c0ca17993144..2c99ea104edd 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -814,8 +814,7 @@ void ISOFileSystem::DoState(PointerWrap &p) bool hasFile = of.file != NULL; p.Do(hasFile); if (hasFile) { - std::string path = ""; - path = EntryFullPath(of.file); + std::string path = EntryFullPath(of.file); p.Do(path); } } diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index 578559c887db..3069fc56484a 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -1192,14 +1192,14 @@ u32 _AtracDecodeData(int atracID, u8 *outbuf, u32 outbufPtr, u32 *SamplesNum, u3 } static u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishFlagAddr, u32 remainAddr) { - int ret = -1; + //int ret = -1; // Note that outAddr being null is completely valid here, used to skip data. u32 numSamples = 0; u32 finish = 0; int remains = 0; - ret = _AtracDecodeData(atracID, Memory::GetPointer(outAddr), outAddr, &numSamples, &finish, &remains); + int ret = _AtracDecodeData(atracID, Memory::GetPointer(outAddr), outAddr, &numSamples, &finish, &remains); if (ret != (int)ATRAC_ERROR_BAD_ATRACID && ret != (int)ATRAC_ERROR_NO_DATA) { if (Memory::IsValidAddress(numSamplesAddr)) Memory::Write_U32(numSamples, numSamplesAddr); diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 1c2ff284e8e2..0fa269238489 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -260,8 +260,8 @@ static int sceNetAdhocPdpCreate(const char *mac, u32 port, int bufferSize, u32 u //return ERROR_NET_ADHOC_PORT_IN_USE; // Create Internet UDP Socket - int usocket = (int)INVALID_SOCKET; - usocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // int usocket = (int)INVALID_SOCKET; + int usocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Valid Socket produced if (usocket != INVALID_SOCKET) { // Change socket buffer size when necessary @@ -1644,8 +1644,8 @@ static int sceNetAdhocPtpOpen(const char *srcmac, int sport, const char *dstmac, // Valid Arguments if (bufsize > 0 && rexmt_int > 0 && rexmt_cnt > 0) { // Create Infrastructure Socket - int tcpsocket = (int)INVALID_SOCKET; - tcpsocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + // int tcpsocket = (int)INVALID_SOCKET; + int tcpsocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // Valid Socket produced if (tcpsocket > 0) { diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 00a733bb1bba..1faf067bd12e 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -87,10 +87,12 @@ void DrawBackground(UIContext &dc, float alpha = 1.0f) { last_yres = yres; } - int img = I_BG; #ifdef GOLD - img = I_BG_GOLD; + int img = I_BG_GOLD; +#else + int img = I_BG; #endif + ui_draw2d.DrawImageStretch(img, dc.GetBounds()); float t = time_now(); for (int i = 0; i < 100; i++) { diff --git a/ext/native/ext/glew/glew.c b/ext/native/ext/glew/glew.c index 9d43a24bdd69..dae06b95cc8a 100644 --- a/ext/native/ext/glew/glew.c +++ b/ext/native/ext/glew/glew.c @@ -141,7 +141,7 @@ void* NSGLGetProcAddress (const GLubyte *name) void* NSGLGetProcAddress (const GLubyte *name) { static const struct mach_header* image = NULL; - NSSymbol symbol; + //NSSymbol symbol; char* symbolName; if (NULL == image) { @@ -151,10 +151,10 @@ void* NSGLGetProcAddress (const GLubyte *name) symbolName = malloc(strlen((const char*)name) + 2); strcpy(symbolName+1, (const char*)name); symbolName[0] = '_'; - symbol = NULL; + //symbol = NULL; /* if (NSIsSymbolNameDefined(symbolName)) symbol = NSLookupAndBindSymbol(symbolName); */ - symbol = image ? NSLookupSymbolInImage(image, symbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) : NULL; + NSSSymbol symbol = image ? NSLookupSymbolInImage(image, symbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) : NULL; free(symbolName); if( symbol ) return NSAddressOfSymbol(symbol); #ifdef GLEW_APPLE_GLX diff --git a/ext/native/tools/atlastool.cpp b/ext/native/tools/atlastool.cpp index e5341fd3be87..736855172f4e 100644 --- a/ext/native/tools/atlastool.cpp +++ b/ext/native/tools/atlastool.cpp @@ -353,7 +353,7 @@ inline vector merge(const vector &a, const vector &ranges, float *metrics_height, Bucket *bucket) { +void RasterizeFonts(const FontReferenceList &fontRefs, vector &ranges, float *metrics_height, Bucket *bucket) { FT_Library freetype; CHECK(FT_Init_FreeType(&freetype) == 0);