mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Fix camera mirroring color issue, fix warning
This commit is contained in:
parent
906da3d194
commit
d769c3223c
@ -888,8 +888,8 @@ static int sysclib_sprintf(u32 dst, u32 fmt) {
|
|||||||
ERROR_LOG(SCEKERNEL, "sysclib_sprintf result string is too long or dst is invalid");
|
ERROR_LOG(SCEKERNEL, "sysclib_sprintf result string is too long or dst is invalid");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy((char *)Memory::GetPointerUnchecked(dst), result.c_str(), result.length() + 1);
|
memcpy((char *)Memory::GetPointerUnchecked(dst), result.c_str(), (int)result.length() + 1);
|
||||||
return result.length();
|
return (int)result.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 sysclib_memset(u32 destAddr, int data, int size) {
|
static u32 sysclib_memset(u32 destAddr, int data, int size) {
|
||||||
|
@ -205,10 +205,10 @@ HRESULT ReaderCallback::OnReadSample(
|
|||||||
for (int y = 0; y < dstH; y++) {
|
for (int y = 0; y < dstH; y++) {
|
||||||
uint8_t *line = device->imageRGB + y * device->imgRGBLineSizes[0];
|
uint8_t *line = device->imageRGB + y * device->imgRGBLineSizes[0];
|
||||||
for (int x = 0; x < dstW / 2; x++) {
|
for (int x = 0; x < dstW / 2; x++) {
|
||||||
const uint8_t r = line[x * 3];
|
const int invX = dstW - 1 - x;
|
||||||
|
const uint8_t r = line[x * 3 + 0];
|
||||||
const uint8_t g = line[x * 3 + 1];
|
const uint8_t g = line[x * 3 + 1];
|
||||||
const uint8_t b = line[x * 3 + 1];
|
const uint8_t b = line[x * 3 + 2];
|
||||||
const int invX = (dstW - 1 - x);
|
|
||||||
line[x * 3 + 0] = line[invX * 3 + 0];
|
line[x * 3 + 0] = line[invX * 3 + 0];
|
||||||
line[x * 3 + 1] = line[invX * 3 + 1];
|
line[x * 3 + 1] = line[invX * 3 + 1];
|
||||||
line[x * 3 + 2] = line[invX * 3 + 2];
|
line[x * 3 + 2] = line[invX * 3 + 2];
|
||||||
|
Loading…
Reference in New Issue
Block a user