aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/hle.cpp
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-06-05 00:26:48 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-06-05 00:26:48 -0400
commit174cc9a0ed023ca89420fbc999ed82337cc94b8b (patch)
tree77880fcb4200aea1921919dc850f1f90897a9657 /src/core/hle/hle.cpp
parent6cdad8390c20aed5c526916816388831d71213a2 (diff)
hle: added a hokey way to force a thread reschedule during CPU single step mode (as used by the debugger)
Diffstat (limited to 'src/core/hle/hle.cpp')
-rw-r--r--src/core/hle/hle.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index 08b0685c..e49395f5 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -16,6 +16,8 @@ namespace HLE {
static std::vector<ModuleDef> g_module_db;
+bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a new thread
+
const FunctionDef* GetSVCInfo(u32 opcode) {
u32 func_num = opcode & 0xFFFFFF; // 8 bits
if (func_num > 0xFF) {
@@ -47,6 +49,7 @@ void Reschedule(const char *reason) {
_dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason.");
#endif
Core::g_app_core->PrepareReschedule();
+ g_reschedule = true;
}
void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) {