mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-26 06:34:17 +01:00
Remove font caching
This commit is contained in:
parent
3fe06f263f
commit
139707a6d2
@ -56,9 +56,11 @@ OUT_SHADERS := shaders
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
OPTIMIZE:= -Os
|
||||
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)
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__ \
|
||||
@ -70,7 +72,7 @@ CXXFLAGS := $(CFLAGS) -std=gnu++17 -fno-exceptions -fno-rtti
|
||||
|
||||
ASFLAGS := -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
|
||||
|
||||
|
22
include/fs.h
22
include/fs.h
@ -100,28 +100,6 @@ public:
|
||||
/// \note Fails on partials writes and errors
|
||||
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:
|
||||
/// \brief Underlying std::FILE*
|
||||
std::unique_ptr<std::FILE, int (*) (std::FILE *)> m_fp{nullptr, nullptr};
|
||||
|
@ -468,7 +468,7 @@ bool FtpSession::poll (std::vector<UniqueFtpSession> const &sessions_)
|
||||
return true;
|
||||
|
||||
// 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)
|
||||
{
|
||||
error ("poll: %s\n", std::strerror (errno));
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -479,9 +479,9 @@ void drawPowerStatus ()
|
||||
ImGui::GetColorU32 (ImGuiCol_Text));
|
||||
|
||||
char buffer[16];
|
||||
std::sprintf (buffer, "%u%%", batteryCharge);
|
||||
std::sprintf (buffer, "%3u%%", batteryCharge);
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user