mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-23 13:55:50 +12:00
Maybe fix oaknut finally
This commit is contained in:
parent
199241ba64
commit
2de0e0975d
2 changed files with 5 additions and 6 deletions
|
@ -118,9 +118,7 @@ class ShaderEmitter : private oaknut::CodeBlock, public oaknut::CodeGenerator {
|
|||
|
||||
// PC must be a valid entrypoint here. It doesn't have that much overhead in this case, so we use std::array<>::at() to assert it does
|
||||
InstructionCallback getInstructionCallback(u32 pc) {
|
||||
// Cast away the constness because casting to a function pointer is hard otherwise. Legal as long as we don't write to *ptr
|
||||
uint8_t* ptr = instructionLabels.at(pc).xptr<u8*>();
|
||||
return reinterpret_cast<InstructionCallback>(ptr);
|
||||
return reinterpret_cast<InstructionCallback>(oaknut::CodeBlock::ptr() + instructionLabels.at(pc).offset());
|
||||
}
|
||||
|
||||
PrologueCallback getPrologueCallback() { return prologueCb; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue