kernel: separate host objects from regular handle range
Burnout Paradise statically expects certain thread handle values based on how many objects it knows it is allocating ahead of time. From this, it calculates an ID by subtracting the thread handle from a base handle of what it expects the first such thread to be assigned. The value is statically declared in the executable and is not determined automatically. The host objects in the handle range made these thread handles higher than what the game expects. Removing these, and allowing 0xF8000000 to be assigned, allows the thread handles to fit perfectly in the range the game expects. It is not clear what handle range the host objects should be taking. For now though, they're 0-based rather than 0xF8000000-based.
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
XModule::XModule(KernelState* kernel_state, ModuleType module_type)
|
||||
: XObject(kernel_state, kObjectType),
|
||||
XModule::XModule(KernelState* kernel_state, ModuleType module_type,
|
||||
bool host_object)
|
||||
: XObject(kernel_state, kObjectType, host_object),
|
||||
module_type_(module_type),
|
||||
processor_module_(nullptr),
|
||||
hmodule_ptr_(0) {
|
||||
|
||||
Reference in New Issue
Block a user