network: fix mingw build

pull/1290/head
flightlessmango 1 month ago
parent a4862f5461
commit 1baecfc493

@ -1444,6 +1444,7 @@ void HudElements::present_mode() {
}
void HudElements::network() {
#ifdef __linux__
if (HUDElements.net && HUDElements.net->should_reset)
HUDElements.net.reset(new Net);
@ -1474,6 +1475,7 @@ void HudElements::network() {
HUDElements.TextColored(HUDElements.colors.text, "KB/s");
ImGui::PopFont();
}
#endif
}
void HudElements::sort_elements(const std::pair<std::string, std::string>& option) {

@ -24,7 +24,7 @@ namespace fs = ghc::filesystem;
class Net {
public:
bool should_reset = false;
struct interface {
struct networkInterface {
std::string name;
uint64_t txBytes;
uint64_t rxBytes;
@ -35,7 +35,7 @@ class Net {
Net();
void update();
std::vector<interface> interfaces = {};
std::vector<networkInterface> interfaces = {};
private:
uint64_t calculateThroughput(long long currentBytes, long long previousBytes,

@ -269,7 +269,9 @@ void update_hud_info_with_frametime(struct swapchain_stats& sw_stats, const stru
hw_update_thread->update(&params, vendorID);
if (fpsmetrics) fpsmetrics->update_thread();
#ifdef __linux__
if (HUDElements.net) HUDElements.net->update();
#endif
sw_stats.fps = 1000000000.0 * sw_stats.n_frames_since_update / elapsed;

Loading…
Cancel
Save