[OpenGL] Merge "shared" files back to imgui_hud.cpp
parent
b40fb95a04
commit
f35e49defa
@ -1,13 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "overlay.h"
|
||||||
#include "imgui_impl_opengl3.h"
|
#include "imgui_impl_opengl3.h"
|
||||||
|
|
||||||
namespace MangoHud { namespace GL {
|
namespace MangoHud { namespace GL {
|
||||||
|
|
||||||
void VARIANT(imgui_init)();
|
extern overlay_params params;
|
||||||
void VARIANT(imgui_create)(void *ctx);
|
void imgui_init();
|
||||||
void VARIANT(imgui_shutdown)();
|
void imgui_create(void *ctx);
|
||||||
void VARIANT(imgui_set_context)(void *ctx);
|
void imgui_shutdown();
|
||||||
void VARIANT(imgui_render)(unsigned int width, unsigned int height);
|
void imgui_set_context(void *ctx);
|
||||||
|
void imgui_render(unsigned int width, unsigned int height);
|
||||||
|
|
||||||
}} // namespace
|
}} // namespace
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#include <cstdlib>
|
|
||||||
#include <functional>
|
|
||||||
#include <thread>
|
|
||||||
#include <iostream>
|
|
||||||
#include "imgui_hud_shared.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_DBUS
|
|
||||||
#include "dbus_info.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace MangoHud { namespace GL {
|
|
||||||
|
|
||||||
notify_thread notifier;
|
|
||||||
static bool cfg_inited = false;
|
|
||||||
ImVec2 window_size;
|
|
||||||
bool inited = false;
|
|
||||||
overlay_params params {};
|
|
||||||
|
|
||||||
// seems to quit by itself though
|
|
||||||
static std::unique_ptr<notify_thread, std::function<void(notify_thread *)>>
|
|
||||||
stop_it(¬ifier, [](notify_thread *n){ stop_notifier(*n); });
|
|
||||||
|
|
||||||
void imgui_init()
|
|
||||||
{
|
|
||||||
if (cfg_inited)
|
|
||||||
return;
|
|
||||||
parse_overlay_config(¶ms, getenv("MANGOHUD_CONFIG"));
|
|
||||||
notifier.params = ¶ms;
|
|
||||||
start_notifier(notifier);
|
|
||||||
window_size = ImVec2(params.width, params.height);
|
|
||||||
init_system_info();
|
|
||||||
cfg_inited = true;
|
|
||||||
init_cpu_stats(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
}} // namespaces
|
|
@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <imgui.h>
|
|
||||||
#include "overlay.h"
|
|
||||||
#include "notify.h"
|
|
||||||
|
|
||||||
namespace MangoHud { namespace GL {
|
|
||||||
|
|
||||||
extern notify_thread notifier;
|
|
||||||
extern ImVec2 window_size;
|
|
||||||
extern bool inited;
|
|
||||||
extern overlay_params params;
|
|
||||||
|
|
||||||
void imgui_init();
|
|
||||||
|
|
||||||
}} // namespaces
|
|
Loading…
Reference in New Issue