Warning and comment fixes, logic precedence fixes in PPGeDraw

This commit is contained in:
Henrik Rydgård 2023-09-21 16:41:09 +02:00
parent 3aed81d51b
commit 602407fcf2
6 changed files with 12 additions and 9 deletions

View File

@ -173,7 +173,7 @@ std::string* Section::GetLine(const char* key, std::string* valueOut, std::strin
if (!strcasecmp(lineKey.c_str(), key))
return &line;
}
return 0;
return nullptr;
}
const std::string* Section::GetLine(const char* key, std::string* valueOut, std::string* commentOut) const
@ -186,7 +186,7 @@ const std::string* Section::GetLine(const char* key, std::string* valueOut, std:
if (!strcasecmp(lineKey.c_str(), key))
return &line;
}
return 0;
return nullptr;
}
void Section::Set(const char* key, uint32_t newValue) {
@ -423,14 +423,14 @@ const Section* IniFile::GetSection(const char* sectionName) const {
for (const auto &iter : sections)
if (!strcasecmp(iter->name().c_str(), sectionName))
return iter.get();
return nullptr ;
return nullptr;
}
Section* IniFile::GetSection(const char* sectionName) {
for (const auto &iter : sections)
if (!strcasecmp(iter->name().c_str(), sectionName))
return iter.get();
return 0;
return nullptr;
}
Section* IniFile::GetOrCreateSection(const char* sectionName) {

View File

@ -314,7 +314,7 @@ static void VulkanFreeLibrary(VulkanLibraryHandle &h) {
}
void VulkanSetAvailable(bool available) {
INFO_LOG(G3D, "Forcing Vulkan availability to true");
INFO_LOG(G3D, "Setting Vulkan availability to true");
g_vulkanAvailabilityChecked = true;
g_vulkanMayBeAvailable = available;
}

View File

@ -827,7 +827,7 @@ static void PPGeResetCurrentText() {
// Draws some text using the one font we have in the atlas.
void PPGeDrawCurrentText(u32 color) {
// If the atlas is larger than 512x512, need to use windows into it.
bool useTextureWindow = g_Config.bSoftwareRendering && atlasWidth > 512 || atlasHeight > 512;
bool useTextureWindow = g_Config.bSoftwareRendering && (atlasWidth > 512 || atlasHeight > 512);
uint32_t texturePosX = 0;
uint32_t texturePosY = 0;
@ -855,7 +855,7 @@ void PPGeDrawCurrentText(u32 color) {
int wantedPosX = (int)floorf(c.sx * textureMaxPosX);
int wantedPosY = (int)floorf(c.sy * textureMaxPosY);
if (useTextureWindow && wantedPosX != texturePosX || wantedPosY != texturePosY) {
if (useTextureWindow && (wantedPosX != texturePosX || wantedPosY != texturePosY)) {
EndVertexDataAndDraw(GE_PRIM_RECTANGLES);
uint32_t offset = atlasWidth * wantedPosY * 256 + wantedPosX * 256;

View File

@ -76,6 +76,7 @@ LinkedShader::LinkedShader(GLRenderManager *render, VShaderID VSID, Shader *vs,
: render_(render), useHWTransform_(useHWTransform) {
PROFILE_THIS_SCOPE("shaderlink");
_assert_(render);
_assert_(vs);
_assert_(fs);

View File

@ -459,6 +459,8 @@ void OnScreenMessagesView::Draw(UIContext &dc) {
// Save the location of the popup, for easy dismissal.
dismissZones.push_back(ClickZone{ (int)j, b });
break;
default:
break;
}
break;
}

View File

@ -62,10 +62,10 @@ public abstract class NativeActivity extends Activity {
// Allows us to skip a lot of initialization on secondary calls to onCreate.
private static boolean initialized = false;
// False to use C++ EGL, queried from C++ after NativeApp.init.
// False to use Vulkan, queried from C++ after NativeApp.init.
private static boolean javaGL = true;
// Graphics and audio interfaces for EGL (javaGL = false)
// Graphics and audio interfaces for Vulkan (javaGL = false)
private NativeSurfaceView mSurfaceView;
private Surface mSurface;
private Thread mRenderLoopThread = null;