mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-12-23 11:21:49 +01:00
Use mulitply instead of divide where feasible
This commit is contained in:
parent
ffa6195182
commit
a265706671
@ -290,7 +290,7 @@ void imgui::citro3d::init ()
|
|||||||
atlas->TexWidth = glyphInfo->sheetWidth;
|
atlas->TexWidth = glyphInfo->sheetWidth;
|
||||||
atlas->TexHeight = glyphInfo->sheetHeight * glyphInfo->nSheets;
|
atlas->TexHeight = glyphInfo->sheetHeight * glyphInfo->nSheets;
|
||||||
atlas->TexUvScale = ImVec2 (1.0f / atlas->TexWidth, 1.0f / atlas->TexHeight);
|
atlas->TexUvScale = ImVec2 (1.0f / atlas->TexWidth, 1.0f / atlas->TexHeight);
|
||||||
atlas->TexUvWhitePixel = ImVec2 (0.5f / 8.0f, glyphInfo->nSheets + 0.5f / 8.0f);
|
atlas->TexUvWhitePixel = ImVec2 (0.5f * 0.125f, glyphInfo->nSheets + 0.5f * 0.125f);
|
||||||
atlas->TexPixelsAlpha8 = static_cast<unsigned char *> (IM_ALLOC (1)); // dummy allocation
|
atlas->TexPixelsAlpha8 = static_cast<unsigned char *> (IM_ALLOC (1)); // dummy allocation
|
||||||
|
|
||||||
// initialize font config
|
// initialize font config
|
||||||
|
@ -74,7 +74,7 @@ void FtpServer::draw ()
|
|||||||
ImGui::SetNextWindowPos (ImVec2 (0, 0), ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowPos (ImVec2 (0, 0), ImGuiCond_FirstUseEver);
|
||||||
#ifdef _3DS
|
#ifdef _3DS
|
||||||
// top screen
|
// top screen
|
||||||
ImGui::SetNextWindowSize (ImVec2 (width, height / 2.0f));
|
ImGui::SetNextWindowSize (ImVec2 (width, height * 0.5f));
|
||||||
#else
|
#else
|
||||||
ImGui::SetNextWindowSize (ImVec2 (width, height));
|
ImGui::SetNextWindowSize (ImVec2 (width, height));
|
||||||
#endif
|
#endif
|
||||||
@ -123,8 +123,8 @@ void FtpServer::draw ()
|
|||||||
ImGui::End ();
|
ImGui::End ();
|
||||||
|
|
||||||
// bottom screen
|
// bottom screen
|
||||||
ImGui::SetNextWindowSize (ImVec2 (width * 0.8f, height / 2.0f));
|
ImGui::SetNextWindowSize (ImVec2 (width * 0.8f, height * 0.5f));
|
||||||
ImGui::SetNextWindowPos (ImVec2 (width * 0.1f, height / 2.0f), ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowPos (ImVec2 (width * 0.1f, height * 0.5f), ImGuiCond_FirstUseEver);
|
||||||
ImGui::Begin ("Sessions",
|
ImGui::Begin ("Sessions",
|
||||||
nullptr,
|
nullptr,
|
||||||
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
|
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);
|
||||||
|
@ -809,9 +809,9 @@ void imgui::deko3d::render ()
|
|||||||
|
|
||||||
void imgui::deko3d::test ()
|
void imgui::deko3d::test ()
|
||||||
{
|
{
|
||||||
auto const x1 = (s_width - LOGO_WIDTH) / 2.0f;
|
auto const x1 = (s_width - LOGO_WIDTH) * 0.5f;
|
||||||
auto const x2 = x1 + LOGO_WIDTH;
|
auto const x2 = x1 + LOGO_WIDTH;
|
||||||
auto const y1 = (s_height - LOGO_HEIGHT) / 2.0f;
|
auto const y1 = (s_height - LOGO_HEIGHT) * 0.5f;
|
||||||
auto const y2 = y1 + LOGO_HEIGHT;
|
auto const y2 = y1 + LOGO_HEIGHT;
|
||||||
|
|
||||||
ImGui::GetBackgroundDrawList ()->AddImage (
|
ImGui::GetBackgroundDrawList ()->AddImage (
|
||||||
|
Loading…
Reference in New Issue
Block a user