mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 03:03:50 +01:00
Fix some bugs and warnings from a pass of static analysis
This commit is contained in:
1 parent
722178e205
commit
d6ebfed432
25 files changed
+72
-49
No files matched your search
@@ -501,7 +501,7 @@ void ImGePixelViewer::UpdateTexture(Draw::DrawContext *draw) {
|
||||
case GE_FORMAT_5551:
|
||||
if (showAlpha) {
|
||||
uint32_t *dst32 = (uint32_t *)dst;
|
||||
uint16_t *src16 = (uint16_t *)dst;
|
||||
const uint16_t *src16 = (const uint16_t *)src;
|
||||
for (int x = 0; x < width; x++) {
|
||||
dst32[x] = (src16[x] >> 15) ? 0xFFFFFFFF : 0xFF000000;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ void ImGePixelViewer::UpdateTexture(Draw::DrawContext *draw) {
|
||||
break;
|
||||
case GE_FORMAT_DEPTH16:
|
||||
{
|
||||
uint16_t *src16 = (uint16_t *)src;
|
||||
const uint16_t *src16 = (const uint16_t *)src;
|
||||
float scale = this->scale / 256.0f;
|
||||
for (int x = 0; x < width; x++) {
|
||||
// Just pick off the upper bits by adding 1 to the byte address
|
||||
|
||||
Reference in new issue
Block a user