Templated XUserModule::GetOptHeader
This commit is contained in:
@@ -166,7 +166,7 @@ X_STATUS XThread::Create() {
|
||||
// Games will specify a certain number of 4b slots that each thread will get.
|
||||
xex2_opt_tls_info* tls_header = nullptr;
|
||||
if (module) {
|
||||
module->GetOptHeader(XEX_HEADER_TLS_INFO, (void**)&tls_header);
|
||||
module->GetOptHeader(XEX_HEADER_TLS_INFO, &tls_header);
|
||||
}
|
||||
|
||||
const uint32_t kDefaultTlsSlotCount = 32;
|
||||
|
||||
@@ -47,6 +47,12 @@ class XUserModule : public XModule {
|
||||
// Get optional header - FOR HOST USE ONLY!
|
||||
X_STATUS GetOptHeader(xe_xex2_header_keys key, void** out_ptr);
|
||||
|
||||
// Get optional header - FOR HOST USE ONLY!
|
||||
template <typename T>
|
||||
X_STATUS GetOptHeader(xe_xex2_header_keys key, T* out_ptr) {
|
||||
return GetOptHeader(key, reinterpret_cast<void**>(out_ptr));
|
||||
}
|
||||
|
||||
// Get optional header that can safely be returned to guest code.
|
||||
X_STATUS GetOptHeader(xe_xex2_header_keys key,
|
||||
uint32_t* out_header_guest_ptr);
|
||||
|
||||
Reference in New Issue
Block a user