mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix various minor warnings.
This commit is contained in:
parent
87eadad326
commit
ef1dc583a2
9 changed files with 15 additions and 10 deletions
|
@ -215,8 +215,10 @@ u8* MemArena::Find4GBBase()
|
|||
#ifdef _M_X64
|
||||
#ifdef _WIN32
|
||||
// 64 bit
|
||||
u8* base = (u8*)VirtualAlloc(0, 0xE1000000, MEM_RESERVE, PAGE_READWRITE);
|
||||
VirtualFree(base, 0, MEM_RELEASE);
|
||||
u8 *base = (u8*)VirtualAlloc(0, 0xE1000000, MEM_RESERVE, PAGE_READWRITE);
|
||||
if (base) {
|
||||
VirtualFree(base, 0, MEM_RELEASE);
|
||||
}
|
||||
return base;
|
||||
#else
|
||||
// Very precarious - mmap cannot return an error when trying to map already used pages.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
namespace Gen
|
||||
{
|
||||
|
||||
enum X64Reg
|
||||
enum X64Reg : u32
|
||||
{
|
||||
EAX = 0, EBX = 3, ECX = 1, EDX = 2,
|
||||
ESI = 6, EDI = 7, EBP = 5, ESP = 4,
|
||||
|
|
|
@ -223,7 +223,7 @@ void RamCachingFileLoader::StartReadAhead(s64 pos) {
|
|||
|
||||
for (u32 i = cacheStartPos; i <= cacheEndPos; ++i) {
|
||||
if (blocks_[i] == 0) {
|
||||
SaveIntoCache(i << BLOCK_SHIFT, BLOCK_SIZE * BLOCK_READAHEAD);
|
||||
SaveIntoCache((u64)i << BLOCK_SHIFT, BLOCK_SIZE * BLOCK_READAHEAD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ static int Replace_dl_write_matrix() {
|
|||
return 60;
|
||||
}
|
||||
|
||||
u32 matrix;
|
||||
u32 matrix = 0;
|
||||
int count = 12;
|
||||
switch (PARAM(1)) {
|
||||
case 3:
|
||||
|
|
|
@ -180,6 +180,8 @@ void __sceAudiocodecDoState(PointerWrap &p){
|
|||
// loadstate if audioList is nonempty
|
||||
auto codec_ = new int[count];
|
||||
auto ctxPtr_ = new u32[count];
|
||||
// These sizeof(pointers) are wrong, but kept to avoid breaking on old saves.
|
||||
// They're not used in new savestates.
|
||||
p.DoArray(codec_, s >= 2 ? count : (int)ARRAY_SIZE(codec_));
|
||||
p.DoArray(ctxPtr_, s >= 2 ? count : (int)ARRAY_SIZE(ctxPtr_));
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
|
|
@ -1656,7 +1656,7 @@ static void __ReportThreadQueueEmpty() {
|
|||
int idleStatus1 = -1;
|
||||
if (idleThread1) {
|
||||
idleThread1->GetQuickInfo(idleDescription1, sizeof(idleDescription1));
|
||||
idleStatus1 = idleThread0->nt.status;
|
||||
idleStatus1 = idleThread1->nt.status;
|
||||
} else {
|
||||
sprintf(idleDescription1, "DELETED");
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ namespace X64JitConstants {
|
|||
const int NUM_MIPS_GPRS = 36;
|
||||
|
||||
#ifdef _M_X64
|
||||
const int NUM_X_REGS = 16;
|
||||
const u32 NUM_X_REGS = 16;
|
||||
#elif _M_IX86
|
||||
const int NUM_X_REGS = 8;
|
||||
const u32 NUM_X_REGS = 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -646,7 +646,8 @@ namespace SaveState
|
|||
break;
|
||||
|
||||
case SAVESTATE_SAVE_SCREENSHOT:
|
||||
if (!TakeGameScreenshot(op.filename.c_str(), SCREENSHOT_JPG, SCREENSHOT_RENDER)) {
|
||||
callbackResult = TakeGameScreenshot(op.filename.c_str(), SCREENSHOT_JPG, SCREENSHOT_RENDER);
|
||||
if (!callbackResult) {
|
||||
ERROR_LOG(COMMON, "Failed to take a screenshot for the savestate! %s", op.filename.c_str());
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -81,7 +81,7 @@ uint32_t TextDrawer::SetFont(const char *fontName, int size, int flags) {
|
|||
else
|
||||
fname = L"Tahoma";
|
||||
|
||||
uint32_t fontHash = hash::Fletcher((const uint8_t *)fontName, strlen(fontName));
|
||||
uint32_t fontHash = fontName ? hash::Fletcher((const uint8_t *)fontName, strlen(fontName)) : 0;
|
||||
fontHash ^= size;
|
||||
fontHash ^= flags << 10;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue