Fixed Debug Globals displaying value as a 64-bit integer and not a 32-bit integer. (#1761)

Resolves #1760.
This commit is contained in:
gir489 2023-07-18 14:46:38 -04:00 committed by GitHub
parent f8255d9e80
commit 1fa7f3448b
2 changed files with 4 additions and 4 deletions

View File

@ -185,7 +185,7 @@ namespace big
if (auto ptr = get_global_ptr(global_test))
{
ImGui::SetNextItemWidth(200.f);
ImGui::InputScalar("Value", ImGuiDataType_S64, ptr);
ImGui::InputScalar("Value", ImGuiDataType_S32, ptr);
}
else
ImGui::Text("INVALID_GLOBAL_READ");
@ -208,7 +208,7 @@ namespace big
for (auto pair : globals)
{
if (auto ptr = get_global_ptr(pair.second))
ImGui::Selectable(std::format("{}", *ptr).c_str(), false, ImGuiSelectableFlags_Disabled);
ImGui::Selectable(std::format("{}", (std::int32_t)*ptr).c_str(), false, ImGuiSelectableFlags_Disabled);
else
ImGui::Selectable("INVALID_GLOBAL_READ", false, ImGuiSelectableFlags_Disabled);
}

View File

@ -15,8 +15,8 @@ namespace big
static int offsets[10][2] = {};
static int offset_count = 0;
static int previous_offset_count = 0;
components::input_text_with_hint("##local_name", "Name", name, sizeof(name));
components::input_text_with_hint("##local_script_thread_name", "Script thread", script_thread_name, sizeof(script_thread_name));
components::input_text("Name", name, sizeof(name));
components::input_text("Script Name", script_thread_name, sizeof(script_thread_name));
ImGui::Text("Base address");
ImGui::InputInt("##local_base_address", &base_address);
ImGui::Text("Offsetcount");