mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
ImGui: Fix DPI scale, disable unneeded logging
This commit is contained in:
1 parent
6dfc5ea9ef
commit
2a1cda05b0
2 files changed
+5
-5
No files matched your search
@@ -435,17 +435,17 @@ void ImDisasmView::Draw(ImDrawList *drawList) {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImVec2 mousePos = ImVec2(io.MousePos.x - canvas_p0.x, io.MousePos.y - canvas_p0.y);
|
||||
if (is_hovered && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) {
|
||||
INFO_LOG(Log::CPU, "Mousedown %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
// INFO_LOG(Log::CPU, "Mousedown %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
onMouseDown(mousePos.x, mousePos.y, 1);
|
||||
}
|
||||
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left)) {
|
||||
INFO_LOG(Log::CPU, "Mouseup %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
// INFO_LOG(Log::CPU, "Mouseup %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
if (is_hovered) {
|
||||
onMouseUp(mousePos.x, mousePos.y, 1);
|
||||
}
|
||||
}
|
||||
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left)) {
|
||||
INFO_LOG(Log::CPU, "Mousedrag %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
// INFO_LOG(Log::CPU, "Mousedrag %f,%f active:%d hover:%d", mousePos.x, mousePos.y, is_active, is_hovered);
|
||||
if (is_hovered) {
|
||||
onMouseMove(mousePos.x, mousePos.y, 1);
|
||||
}
|
||||
|
||||
@@ -220,12 +220,12 @@ void ImGui_ImplThin3d_DestroyDeviceObjects() {
|
||||
bool ImGui_ImplThin3d_Init(Draw::DrawContext *draw, const uint8_t *ttf_font, size_t size) {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
if (ttf_font) {
|
||||
io.Fonts->AddFontFromMemoryTTF((void *)ttf_font, size, 18.0f * g_display.dpi_scale_x, nullptr, io.Fonts->GetGlyphRangesDefault());
|
||||
io.Fonts->AddFontFromMemoryTTF((void *)ttf_font, (int)size, 21.0f / g_display.dpi_scale_x, nullptr, io.Fonts->GetGlyphRangesDefault());
|
||||
} else {
|
||||
// necessary?
|
||||
io.Fonts->AddFontDefault();
|
||||
}
|
||||
ImGui::GetStyle().ScaleAllSizes(g_display.dpi_scale_x);
|
||||
ImGui::GetStyle().ScaleAllSizes(1.0f / g_display.dpi_scale_x);
|
||||
|
||||
IMGUI_CHECKVERSION();
|
||||
IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
|
||||
|
||||
Reference in new issue
Block a user