GET /sessions returns the title info.
This commit is contained in:
@@ -132,9 +132,6 @@ X_STATUS XModule::Launch(uint32_t flags) {
|
||||
|
||||
XELOGI("Launching module...");
|
||||
|
||||
// Set as the main module, while running.
|
||||
kernel_state()->SetExecutableModule(this);
|
||||
|
||||
Dump();
|
||||
|
||||
// Create a thread to run in.
|
||||
@@ -154,7 +151,6 @@ X_STATUS XModule::Launch(uint32_t flags) {
|
||||
// Wait until thread completes.
|
||||
thread->Wait(0, 0, 0, NULL);
|
||||
|
||||
kernel_state()->SetExecutableModule(NULL);
|
||||
thread->Release();
|
||||
|
||||
return X_STATUS_SUCCESS;
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <xenia/emulator.h>
|
||||
#include <xenia/export_resolver.h>
|
||||
#include <xenia/debug/debug_server.h>
|
||||
#include <xenia/kernel/xboxkrnl/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/xboxkrnl/objects/xmodule.h>
|
||||
@@ -166,15 +168,25 @@ int XboxkrnlModule::LaunchModule(const char* path) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Set as the main module, while running.
|
||||
kernel_state_->SetExecutableModule(module);
|
||||
|
||||
if (FLAGS_abort_before_entry) {
|
||||
XELOGI("--abort_before_entry causing an early exit");
|
||||
module->Release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Spin up the debugger and let it know we are starting.
|
||||
if (emulator_->debug_server()->BeforeEntry()) {
|
||||
XELOGE("Debugger failed to startup.");
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Launch the module.
|
||||
// NOTE: this won't return until the module exits.
|
||||
result_code = module->Launch(0);
|
||||
kernel_state_->SetExecutableModule(NULL);
|
||||
if (XFAILED(result_code)) {
|
||||
XELOGE("Failed to launch module %s: %.8X", path, result_code);
|
||||
module->Release();
|
||||
|
||||
@@ -39,6 +39,8 @@ public:
|
||||
XboxkrnlModule(Emulator* emulator);
|
||||
virtual ~XboxkrnlModule();
|
||||
|
||||
KernelState* kernel_state() const { return kernel_state_; }
|
||||
|
||||
int LaunchModule(const char* path);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user