Linting.
This commit is contained in:
parent
03ffb20a43
commit
1788ee1589
|
@ -122,8 +122,7 @@ uint32_t KernelState::title_id() const {
|
|||
assert_not_null(executable_module_);
|
||||
|
||||
xex2_opt_execution_info* exec_info = 0;
|
||||
executable_module_->GetOptHeader(XEX_HEADER_EXECUTION_INFO,
|
||||
&exec_info);
|
||||
executable_module_->GetOptHeader(XEX_HEADER_EXECUTION_INFO, &exec_info);
|
||||
|
||||
if (exec_info) {
|
||||
return exec_info->title_id;
|
||||
|
|
|
@ -586,11 +586,8 @@ void XThread::DeliverAPCs(void* data) {
|
|||
// kernel_routine(apc_address, &normal_routine, &normal_context,
|
||||
// &system_arg1, &system_arg2)
|
||||
uint64_t kernel_args[] = {
|
||||
apc_ptr,
|
||||
thread->scratch_address_ + 0,
|
||||
thread->scratch_address_ + 4,
|
||||
thread->scratch_address_ + 8,
|
||||
thread->scratch_address_ + 12,
|
||||
apc_ptr, thread->scratch_address_ + 0, thread->scratch_address_ + 4,
|
||||
thread->scratch_address_ + 8, thread->scratch_address_ + 12,
|
||||
};
|
||||
processor->Execute(thread->thread_state(), apc->kernel_routine,
|
||||
kernel_args, xe::countof(kernel_args));
|
||||
|
|
|
@ -380,12 +380,9 @@ void XUserModule::Dump() {
|
|||
auto opt_exec_info =
|
||||
reinterpret_cast<const xex2_opt_execution_info*>(opt_header_ptr);
|
||||
|
||||
printf(" Media ID: %.8X\n",
|
||||
(uint32_t)opt_exec_info->media_id);
|
||||
printf(" Title ID: %.8X\n",
|
||||
(uint32_t)opt_exec_info->title_id);
|
||||
printf(" Savegame ID: %.8X\n",
|
||||
(uint32_t)opt_exec_info->title_id);
|
||||
printf(" Media ID: %.8X\n", (uint32_t)opt_exec_info->media_id);
|
||||
printf(" Title ID: %.8X\n", (uint32_t)opt_exec_info->title_id);
|
||||
printf(" Savegame ID: %.8X\n", (uint32_t)opt_exec_info->title_id);
|
||||
printf(" Disc Number / Total: %d / %d\n",
|
||||
(uint8_t)opt_exec_info->disc_number,
|
||||
(uint8_t)opt_exec_info->disc_count);
|
||||
|
@ -422,13 +419,15 @@ void XUserModule::Dump() {
|
|||
exe_address + dir->offset);
|
||||
|
||||
// e->AddressOfX RVAs are relative to the IMAGE_EXPORT_DIRECTORY!
|
||||
uint32_t* function_table = (uint32_t*)((uint64_t)e + e->AddressOfFunctions);
|
||||
uint32_t* function_table =
|
||||
(uint32_t*)((uint64_t)e + e->AddressOfFunctions);
|
||||
|
||||
// Names relative to directory
|
||||
uint32_t* name_table = (uint32_t*)((uint64_t)e + e->AddressOfNames);
|
||||
|
||||
// Table of ordinals (by name)
|
||||
uint16_t* ordinal_table = (uint16_t*)((uint64_t)e + e->AddressOfNameOrdinals);
|
||||
uint16_t* ordinal_table =
|
||||
(uint16_t*)((uint64_t)e + e->AddressOfNameOrdinals);
|
||||
|
||||
for (uint32_t i = 0; i < e->NumberOfNames; i++) {
|
||||
const char* name = (const char*)((uint8_t*)e + name_table[i]);
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#include "xenia/base/memory.h"
|
||||
#include "xenia/base/platform.h"
|
||||
|
||||
namespace xe {
|
||||
} // namespace xe
|
||||
namespace xe {} // namespace xe
|
||||
|
||||
// TODO(benvanik): remove.
|
||||
#define XEEXPECTZERO(expr) \
|
||||
|
@ -249,7 +248,8 @@ int xe_xex2_read_header(const uint8_t* addr, const size_t length,
|
|||
auto import_libraries =
|
||||
reinterpret_cast<const xe::xex2_opt_import_libraries*>(pp);
|
||||
|
||||
const uint32_t max_count = (uint32_t)xe::countof(header->import_libraries);
|
||||
const uint32_t max_count =
|
||||
(uint32_t)xe::countof(header->import_libraries);
|
||||
uint32_t count = import_libraries->library_count;
|
||||
assert_true(count <= max_count);
|
||||
if (count > max_count) {
|
||||
|
@ -286,8 +286,7 @@ int xe_xex2_read_header(const uint8_t* addr, const size_t length,
|
|||
library->version.value = src_library->version.value;
|
||||
library->min_version.value = src_library->version_min.value;
|
||||
|
||||
std::strncpy(library->name,
|
||||
string_table[src_library->name_index],
|
||||
std::strncpy(library->name, string_table[src_library->name_index],
|
||||
xe::countof(library->name));
|
||||
|
||||
library->record_count = src_library->count;
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
#include "xenia/kernel/util/xex2_info.h"
|
||||
#include "xenia/memory.h"
|
||||
|
||||
namespace xe {
|
||||
} // namespace xe
|
||||
namespace xe {} // namespace xe
|
||||
|
||||
typedef struct { int reserved; } xe_xex2_options_t;
|
||||
|
||||
|
|
Loading…
Reference in New Issue