mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Fix warnings
This commit is contained in:
parent
9eb661c768
commit
4cda023c22
2 changed files with 6 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
class HIDService {
|
class HIDService {
|
||||||
Handle handle = KernelHandles::HID;
|
Handle handle = KernelHandles::HID;
|
||||||
Memory& mem;
|
Memory& mem;
|
||||||
u8* sharedMem; // Pointer to HID shared memory
|
u8* sharedMem = nullptr; // Pointer to HID shared memory
|
||||||
|
|
||||||
MAKE_LOG_FUNCTION(log, hidLogger)
|
MAKE_LOG_FUNCTION(log, hidLogger)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ public:
|
||||||
void setSharedMem(u8* ptr) {
|
void setSharedMem(u8* ptr) {
|
||||||
sharedMem = ptr;
|
sharedMem = ptr;
|
||||||
if (ptr != nullptr) { // Zero-fill shared memory in case the process tries to read stale service data or vice versa
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -27,11 +27,14 @@ u8 PICAShader::getIndexedSource(u32 source, u32 index) {
|
||||||
return source;
|
return source;
|
||||||
|
|
||||||
switch (index) {
|
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 1: return u8(source + addrRegister.x());
|
||||||
case 2: return u8(source + addrRegister.y());
|
case 2: return u8(source + addrRegister.y());
|
||||||
case 3: return u8(source + loopCounter);
|
case 3: return u8(source + loopCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Helpers::panic("Reached unreachable path in PICAShader::getIndexedSource");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PICAShader::vec4f PICAShader::getSource(u32 source) {
|
PICAShader::vec4f PICAShader::getSource(u32 source) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue