diff options
| author | hrydgard <hrydgard@gmail.com> | 2010-02-14 22:37:46 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2010-02-14 22:37:46 +0000 |
| commit | b245c398a36c07575fcbce4f2cd87640aed8a0a9 (patch) | |
| tree | 7a8ac6ee7d9f9f274a3d999c9a82d7fb563f506f /Source/Core/Common | |
| parent | 14bb1b5f01b20de9c802b5d03de5490f45e72fd1 (diff) | |
keep a few separate thunkmanagers so they don't all share the same register backup area. seems to fix the single-core-paired-single-x64 issue in mario kart wii, please test the other games that were problematic.
this is probably not the best way to fix it but it'll do for now.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5062 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/Thunk.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/Thunk.h | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/Common/Src/Thunk.cpp b/Source/Core/Common/Src/Thunk.cpp index aad55cb3c4..1792df3e77 100644 --- a/Source/Core/Common/Src/Thunk.cpp +++ b/Source/Core/Common/Src/Thunk.cpp @@ -23,8 +23,6 @@ #include "ABI.h" #include "Thunk.h" -ThunkManager thunks; - #define THUNK_ARENA_SIZE 1024*1024*1 namespace diff --git a/Source/Core/Common/Src/Thunk.h b/Source/Core/Common/Src/Thunk.h index 44cfc0c4cb..ac40babe4c 100644 --- a/Source/Core/Common/Src/Thunk.h +++ b/Source/Core/Common/Src/Thunk.h @@ -43,13 +43,17 @@ class ThunkManager : public Gen::XCodeBlock const u8 *load_regs; public: + ThunkManager() { + Init(); + } + ~ThunkManager() { + Shutdown(); + } + void *ProtectFunction(void *function, int num_params); +private: void Init(); - void Reset(); void Shutdown(); - - void *ProtectFunction(void *function, int num_params); + void Reset(); }; -extern ThunkManager thunks; - #endif // _THUNK_H_ |
