Skip to content

Commit

Permalink
Fix camera mirroring color issue, fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed May 5, 2024
1 parent 906da3d commit d769c32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Core/HLE/sceKernelInterrupt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
return 0;
}
memcpy((char *)Memory::GetPointerUnchecked(dst), result.c_str(), result.length() + 1);
return result.length();
memcpy((char *)Memory::GetPointerUnchecked(dst), result.c_str(), (int)result.length() + 1);
return (int)result.length();
}

static u32 sysclib_memset(u32 destAddr, int data, int size) {
Expand Down
6 changes: 3 additions & 3 deletions Windows/CaptureDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ HRESULT ReaderCallback::OnReadSample(
for (int y = 0; y < dstH; y++) {
uint8_t *line = device->imageRGB + y * device->imgRGBLineSizes[0];
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 b = line[x * 3 + 1];
const int invX = (dstW - 1 - x);
const uint8_t b = line[x * 3 + 2];
line[x * 3 + 0] = line[invX * 3 + 0];
line[x * 3 + 1] = line[invX * 3 + 1];
line[x * 3 + 2] = line[invX * 3 + 2];
Expand Down

0 comments on commit d769c32

Please sign in to comment.