mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Global: Fix some warnings.
This commit is contained in:
1 parent
9eccea2d5e
commit
bd1ed897cf
6 files changed
+23
-8
No files matched your search
@@ -468,7 +468,8 @@ bool DisassembleSPIRV(std::vector<uint32_t> spirv, std::string *output) {
|
||||
uint32_t d = spirv[i];
|
||||
int wordCount = d >> 16;
|
||||
int opcode = d & 0xFFFF;
|
||||
const OpInfo &op = opInfo[opcode];
|
||||
// Force to a valid index in the array.
|
||||
const OpInfo &op = opInfo[opcode >= (int)ARRAY_SIZE(opInfo) ? 0 : opcode];
|
||||
int target = (i < (int)spirv.size() - 1) ? spirv[(i + 1)] : 0; // Not always, but used often enough that we get it here.
|
||||
int source, source2, resType;
|
||||
std::string name;
|
||||
|
||||
@@ -176,7 +176,7 @@ u32 sceKernelLibcGettimeofday(u32 timeAddr, u32 tzAddr)
|
||||
std::string KernelTimeNowFormatted() {
|
||||
time_t emulatedTime = (time_t)start_time + (u32)(CoreTiming::GetGlobalTimeUs() / 1000000ULL);
|
||||
tm* timePtr = localtime(&emulatedTime);
|
||||
bool DST = timePtr->tm_isdst;
|
||||
bool DST = timePtr->tm_isdst != 0;
|
||||
u8 seconds = timePtr->tm_sec;
|
||||
u8 minutes = timePtr->tm_min;
|
||||
u8 hours = timePtr->tm_hour;
|
||||
@@ -187,4 +187,4 @@ std::string KernelTimeNowFormatted() {
|
||||
u16 years = timePtr->tm_year + 1900;
|
||||
std::string timestamp = StringFromFormat("%04d-%02d-%02d_%02d-%02d-%02d", years, months, days, hours, minutes, seconds);
|
||||
return timestamp;
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void TextureReplacer::ParseHashRange(const std::string &key, const std::string &
|
||||
return;
|
||||
}
|
||||
|
||||
const u64 rangeKey = ((u64)addr << 32) | (fromW << 16) | fromH;
|
||||
const u64 rangeKey = ((u64)addr << 32) | ((u64)fromW << 16) | fromH;
|
||||
hashranges_[rangeKey] = WidthHeightPair(toW, toH);
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ std::string TextureReplacer::HashName(u64 cachekey, u32 hash, int level) {
|
||||
}
|
||||
|
||||
bool TextureReplacer::LookupHashRange(u32 addr, int &w, int &h) {
|
||||
const u64 rangeKey = ((u64)addr << 32) | (w << 16) | h;
|
||||
const u64 rangeKey = ((u64)addr << 32) | ((u64)w << 16) | h;
|
||||
auto range = hashranges_.find(rangeKey);
|
||||
if (range != hashranges_.end()) {
|
||||
const WidthHeightPair &wh = range->second;
|
||||
|
||||
@@ -156,7 +156,6 @@ bool ConvertToVulkanGLSL(std::string *dest, TranslatedShaderMetadata *destMetada
|
||||
std::string line;
|
||||
std::stringstream instream(src);
|
||||
while (std::getline(instream, line)) {
|
||||
char buffer[256];
|
||||
int vecSize, num;
|
||||
if (line.find("uniform bool") != std::string::npos) {
|
||||
continue;
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
#pragma once
|
||||
// Copyright (c) 2014- PPSSPP 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 or later versions.
|
||||
|
||||
// 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 git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "GPU/Common/StencilCommon.h"
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ void TextDrawerAndroid::DrawString(DrawBuffer &target, const char *str, float x,
|
||||
entry->lastUsedFrame = frameCount_;
|
||||
draw_->BindTexture(0, entry->texture);
|
||||
} else {
|
||||
double size;
|
||||
double size = 0.0;
|
||||
auto iter = fontMap_.find(fontHash_);
|
||||
if (iter != fontMap_.end()) {
|
||||
size = iter->second.size;
|
||||
|
||||
Reference in new issue
Block a user