Fix warnings

This commit is contained in:
wheremyfoodat 2022-09-25 17:19:21 +03:00
parent 9eb661c768
commit 4cda023c22
2 changed files with 6 additions and 3 deletions

View file

@ -7,7 +7,7 @@
class HIDService {
Handle handle = KernelHandles::HID;
Memory& mem;
u8* sharedMem; // Pointer to HID shared memory
u8* sharedMem = nullptr; // Pointer to HID shared memory
MAKE_LOG_FUNCTION(log, hidLogger)
@ -22,7 +22,7 @@ public:
void setSharedMem(u8* ptr) {
sharedMem = ptr;
if (ptr != nullptr) { // Zero-fill shared memory in case the process tries to read stale service data or vice versa
std::memset(ptr, 0xff, 0x2b0);
std::memset(ptr, 0, 0x2b0);
}
}
};

View file

@ -27,11 +27,14 @@ u8 PICAShader::getIndexedSource(u32 source, u32 index) {
return source;
switch (index) {
case 0: return u8(source); // No offset applied
case 0: [[likely]] return u8(source); // No offset applied
case 1: return u8(source + addrRegister.x());
case 2: return u8(source + addrRegister.y());
case 3: return u8(source + loopCounter);
}
Helpers::panic("Reached unreachable path in PICAShader::getIndexedSource");
return 0;
}
PICAShader::vec4f PICAShader::getSource(u32 source) {