Converting logging to ASCII and other Windows fixes.
This commit is contained in:
@@ -59,11 +59,11 @@ X_STATUS XModule::LoadFromFile(const char* path) {
|
||||
// TODO(benvanik): make this code shared?
|
||||
fs::Entry* fs_entry = kernel_state()->filesystem()->ResolvePath(path);
|
||||
if (!fs_entry) {
|
||||
XELOGE(XT("File not found: %s"), path);
|
||||
XELOGE("File not found: %s", path);
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
if (fs_entry->type() != fs::Entry::kTypeFile) {
|
||||
XELOGE(XT("Invalid file type: %s"), path);
|
||||
XELOGE("Invalid file type: %s", path);
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
fs::FileEntry* fs_file = static_cast<fs::FileEntry*>(fs_entry);
|
||||
@@ -114,14 +114,14 @@ X_STATUS XModule::GetSection(const char* name,
|
||||
|
||||
void* XModule::GetProcAddressByOrdinal(uint16_t ordinal) {
|
||||
// TODO(benvanik): check export tables.
|
||||
XELOGE(XT("GetProcAddressByOrdinal not implemented"));
|
||||
XELOGE("GetProcAddressByOrdinal not implemented");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
X_STATUS XModule::Launch(uint32_t flags) {
|
||||
const xe_xex2_header_t* header = xex_header();
|
||||
|
||||
XELOGI(XT("Launching module..."));
|
||||
XELOGI("Launching module...");
|
||||
|
||||
// Set as the main module, while running.
|
||||
kernel_state()->SetExecutableModule(this);
|
||||
@@ -137,7 +137,7 @@ X_STATUS XModule::Launch(uint32_t flags) {
|
||||
|
||||
X_STATUS result = thread->Create();
|
||||
if (XFAILED(result)) {
|
||||
XELOGE(XT("Could not create launch thread: %.8X"), result);
|
||||
XELOGE("Could not create launch thread: %.8X", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ XThread::~XThread() {
|
||||
|
||||
if (thread_handle_) {
|
||||
// TODO(benvanik): platform kill
|
||||
XELOGE(XT("Thread disposed without exiting"));
|
||||
XELOGE("Thread disposed without exiting");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ X_STATUS XThread::Create() {
|
||||
// consistent.
|
||||
thread_state_address_ = xe_memory_heap_alloc(memory(), 0, 2048, 0);
|
||||
if (!thread_state_address_) {
|
||||
XELOGW(XT("Unable to allocate thread state block"));
|
||||
XELOGW("Unable to allocate thread state block");
|
||||
return X_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
@@ -106,13 +106,13 @@ X_STATUS XThread::Create() {
|
||||
processor_state_ = kernel_state()->processor()->AllocThread(
|
||||
creation_params_.stack_size, thread_state_address_);
|
||||
if (!processor_state_) {
|
||||
XELOGW(XT("Unable to allocate processor thread state"));
|
||||
XELOGW("Unable to allocate processor thread state");
|
||||
return X_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
X_STATUS return_code = PlatformCreate();
|
||||
if (XFAILED(return_code)) {
|
||||
XELOGW(XT("Unable to create platform thread (%.8X)"), return_code);
|
||||
XELOGW("Unable to create platform thread (%.8X)", return_code);
|
||||
return return_code;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ X_STATUS XThread::PlatformCreate() {
|
||||
if (!thread_handle_) {
|
||||
uint32_t last_error = GetLastError();
|
||||
// TODO(benvanik): translate?
|
||||
XELOGE(XT("CreateThread failed with %d"), last_error);
|
||||
XELOGE("CreateThread failed with %d", last_error);
|
||||
return last_error;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ X_STATUS XThread::PlatformExit(int exit_code) {
|
||||
void XThread::Execute() {
|
||||
// Run XapiThreadStartup first, if present.
|
||||
if (creation_params_.xapi_thread_startup) {
|
||||
XELOGE(XT("xapi_thread_startup not implemented"));
|
||||
XELOGE("xapi_thread_startup not implemented");
|
||||
}
|
||||
|
||||
// Run user code.
|
||||
|
||||
Reference in New Issue
Block a user