Remove font caching

This commit is contained in:
Michael Theall 2020-04-10 12:18:57 -05:00
parent 3fe06f263f
commit 139707a6d2
5 changed files with 890 additions and 1124 deletions

View File

@ -56,9 +56,11 @@ OUT_SHADERS := shaders
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# options for code generation # options for code generation
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
OPTIMIZE:= -Os
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
CFLAGS := -g -Wall -Wno-narrowing -Os -ffunction-sections -fdata-sections -save-temps \ CFLAGS := -g -Wall -Wno-narrowing $(OPTIMIZE) \
-ffunction-sections -fdata-sections \
$(ARCH) $(DEFINES) $(ARCH) $(DEFINES)
CFLAGS += $(INCLUDE) -D__SWITCH__ \ CFLAGS += $(INCLUDE) -D__SWITCH__ \
@ -70,7 +72,7 @@ CXXFLAGS := $(CFLAGS) -std=gnu++17 -fno-exceptions -fno-rtti
ASFLAGS := -g $(ARCH) ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) \ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) \
-Wl,-Map,$(notdir $*.map) -Wl,--gc-sections $(OPTIMIZE) -Wl,-Map,$(notdir $*.map) -Wl,--gc-sections
LIBS := `$(PREFIX)pkg-config --libs libzstd` -ldeko3dd -lnx LIBS := `$(PREFIX)pkg-config --libs libzstd` -ldeko3dd -lnx

View File

@ -100,28 +100,6 @@ public:
/// \note Fails on partials writes and errors /// \note Fails on partials writes and errors
bool writeAll (void const *data_, std::size_t size_); bool writeAll (void const *data_, std::size_t size_);
/// \brief Read data
/// \tparam T Type to read
template <typename T>
T read ()
{
T data;
if (!readAll (&data, sizeof (data)))
std::abort ();
return data;
}
/// \brief Write data
/// \tparam T type to write
/// \param data_ Data to write
template <typename T>
void write (T const &data_)
{
if (!writeAll (&data_, sizeof (data_)))
std::abort ();
}
private: private:
/// \brief Underlying std::FILE* /// \brief Underlying std::FILE*
std::unique_ptr<std::FILE, int (*) (std::FILE *)> m_fp{nullptr, nullptr}; std::unique_ptr<std::FILE, int (*) (std::FILE *)> m_fp{nullptr, nullptr};

View File

@ -468,7 +468,7 @@ bool FtpSession::poll (std::vector<UniqueFtpSession> const &sessions_)
return true; return true;
// poll for activity // poll for activity
auto const rc = Socket::poll (pollInfo.data (), pollInfo.size (), 16ms); auto const rc = Socket::poll (pollInfo.data (), pollInfo.size (), 100ms);
if (rc < 0) if (rc < 0)
{ {
error ("poll: %s\n", std::strerror (errno)); error ("poll: %s\n", std::strerror (errno));

File diff suppressed because it is too large Load Diff

View File

@ -479,9 +479,9 @@ void drawPowerStatus ()
ImGui::GetColorU32 (ImGuiCol_Text)); ImGui::GetColorU32 (ImGuiCol_Text));
char buffer[16]; char buffer[16];
std::sprintf (buffer, "%u%%", batteryCharge); std::sprintf (buffer, "%3u%%", batteryCharge);
ImGui::GetForegroundDrawList ()->AddText ( ImGui::GetForegroundDrawList ()->AddText (
ImVec2 (x1 - 60.0f, y1), ImGui::GetColorU32 (ImGuiCol_Text), buffer); ImVec2 (x1 - 70.0f, y1), ImGui::GetColorU32 (ImGuiCol_Text), buffer);
} }
/// \brief Draw status /// \brief Draw status