mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Some minor initialization fixes, and one potential crash found by static analysis
This commit is contained in:
1 parent
d39101d294
commit
4ec1e2a175
7 files changed
+16
-13
No files matched your search
+1
-3
@@ -33,9 +33,7 @@ std::atomic<bool> hasDispatchQueue;
|
||||
std::deque<DispatchQueueItem> g_dispatchQueue;
|
||||
|
||||
void EventTriggered(Event *e, EventParams params) {
|
||||
DispatchQueueItem item;
|
||||
item.e = e;
|
||||
item.params = params;
|
||||
DispatchQueueItem item{ e, params };
|
||||
|
||||
std::unique_lock<std::mutex> guard(eventMutex_);
|
||||
// Set before adding so we lock and check the added value.
|
||||
|
||||
@@ -420,7 +420,7 @@ private:
|
||||
std::string negativeLabel_;
|
||||
std::string units_;
|
||||
ScreenManager *screenManager_;
|
||||
bool restoreFocus_;
|
||||
bool restoreFocus_ = false;
|
||||
};
|
||||
|
||||
class PopupSliderChoiceFloat : public AbstractChoiceWithValueDisplay {
|
||||
@@ -457,7 +457,7 @@ private:
|
||||
std::string zeroLabel_;
|
||||
std::string units_;
|
||||
ScreenManager *screenManager_;
|
||||
bool restoreFocus_;
|
||||
bool restoreFocus_ = false;
|
||||
bool liveUpdate_ = false;
|
||||
bool hasDropShadow_ = true;
|
||||
};
|
||||
|
||||
@@ -1147,7 +1147,10 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int
|
||||
draw_->BindTextures(0, 1, &pixelsTex, Draw::TextureBindFlags::VULKAN_BIND_ARRAY);
|
||||
|
||||
// TODO: Replace with draw2D_.Blit() directly.
|
||||
DrawActiveTexture(dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, u0, v0, u1, v1, ROTATION_LOCKED_HORIZONTAL, flags);
|
||||
DrawActiveTexture(dstX, dstY, width, height,
|
||||
vfb ? vfb->bufferWidth : pixel_xres,
|
||||
vfb ? vfb->bufferHeight : pixel_yres,
|
||||
u0, v0, u1, v1, ROTATION_LOCKED_HORIZONTAL, flags);
|
||||
|
||||
gpuStats.numUploads++;
|
||||
pixelsTex->Release();
|
||||
|
||||
@@ -1036,7 +1036,7 @@ bool TextureCacheCommon::MatchFramebuffer(
|
||||
}
|
||||
return true;
|
||||
} else if (IsClutFormat((GETextureFormat)(entry.format)) || IsDXTFormat((GETextureFormat)(entry.format))) {
|
||||
WARN_LOG_ONCE(fourEightBit, G3D, "%s fb_format not matching framebuffer of format %s at %08x/%d", GeTextureFormatToString(entry.format), GeBufferFormatToString(fb_format), fb_address, fb_stride);
|
||||
WARN_LOG_ONCE(fourEightBit, G3D, "%s texture format not matching framebuffer of format %s at %08x/%d", GeTextureFormatToString(entry.format), GeBufferFormatToString(fb_format), fb_address, fb_stride);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -583,7 +583,7 @@ private:
|
||||
void Jit_AnyS16Morph(int srcoff, int dstoff);
|
||||
void Jit_AnyFloatMorph(int srcoff, int dstoff);
|
||||
|
||||
const VertexDecoder *dec_;
|
||||
const VertexDecoder *dec_ = nullptr;
|
||||
#if PPSSPP_ARCH(ARM64)
|
||||
Arm64Gen::ARM64FloatEmitter fp;
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -114,6 +114,9 @@ bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) {
|
||||
#endif
|
||||
|
||||
void GPU_Shutdown() {
|
||||
// Reduce the risk for weird races with the Windows GE debugger.
|
||||
gpuDebug = nullptr;
|
||||
|
||||
// Wait for IsReady, since it might be running on a thread.
|
||||
if (gpu) {
|
||||
gpu->CancelReady();
|
||||
@@ -123,5 +126,4 @@ void GPU_Shutdown() {
|
||||
}
|
||||
delete gpu;
|
||||
gpu = nullptr;
|
||||
gpuDebug = nullptr;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ void WindowsGLContext::Resume() {
|
||||
void FormatDebugOutputARB(char outStr[], size_t outStrSize, GLenum source, GLenum type,
|
||||
GLuint id, GLenum severity, const char *msg) {
|
||||
|
||||
char sourceStr[32];
|
||||
char sourceStr[32]{};
|
||||
const char *sourceFmt;
|
||||
switch(source) {
|
||||
case GL_DEBUG_SOURCE_API_ARB: sourceFmt = "API"; break;
|
||||
@@ -103,7 +103,7 @@ void FormatDebugOutputARB(char outStr[], size_t outStrSize, GLenum source, GLenu
|
||||
}
|
||||
snprintf(sourceStr, sizeof(sourceStr), sourceFmt, source);
|
||||
|
||||
char typeStr[32];
|
||||
char typeStr[32]{};
|
||||
const char *typeFmt;
|
||||
switch(type) {
|
||||
case GL_DEBUG_TYPE_ERROR_ARB: typeFmt = "ERROR"; break;
|
||||
@@ -116,7 +116,7 @@ void FormatDebugOutputARB(char outStr[], size_t outStrSize, GLenum source, GLenu
|
||||
}
|
||||
snprintf(typeStr, sizeof(typeStr), typeFmt, type);
|
||||
|
||||
char severityStr[32];
|
||||
char severityStr[32]{};
|
||||
const char *severityFmt;
|
||||
switch (severity) {
|
||||
case GL_DEBUG_SEVERITY_HIGH_ARB: severityFmt = "HIGH"; break;
|
||||
@@ -130,7 +130,7 @@ void FormatDebugOutputARB(char outStr[], size_t outStrSize, GLenum source, GLenu
|
||||
}
|
||||
|
||||
void DebugCallbackARB(GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
GLsizei length, const GLchar *message, GLvoid *userParam) {
|
||||
GLsizei length, const GLchar *message, GLvoid *userParam) {
|
||||
// Ignore buffer mapping messages from NVIDIA
|
||||
if (source == GL_DEBUG_SOURCE_API_ARB && type == GL_DEBUG_TYPE_OTHER_ARB && id == 131185) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user