diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-16 02:21:38 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-16 02:21:38 +0100 |
commit | ebd8c2726b8caac6adc00cf15c5631e51d05ba1f (patch) | |
tree | fb60d1908154aeec0ff6b568b269e97b9601d70b /src | |
parent | 970d87975b01cd083749179df489477b94a35f41 (diff) |
Rewrite linux global hotkey to not depend on any libraries (also allows it to work on non-systemd systems(?)), remove unused gsr-window-name
Diffstat (limited to 'src')
-rw-r--r-- | src/Overlay.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index da3758e..628a862 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -1374,6 +1374,7 @@ namespace gsr { } } + // TODO: Instead of checking power supply status periodically listen to power supply event void Overlay::update_power_supply_status() { if(config.replay_config.turn_on_replay_automatically_mode != "turn_on_at_power_supply_connected") return; diff --git a/src/main.cpp b/src/main.cpp index 98b1ce3..c7a47c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -156,7 +156,7 @@ int main(void) { signal(SIGINT, sigint_handler); if(mgl_init() != 0) { - fprintf(stderr, "error: failed to initialize mgl. Failed to either connect to the X11 server or setup opengl\n"); + fprintf(stderr, "Error: failed to initialize mgl. Failed to either connect to the X11 server or setup opengl\n"); exit(1); } @@ -164,13 +164,13 @@ int main(void) { // TODO: Show the error in ui gsr::GsrInfoExitStatus gsr_info_exit_status = gsr::get_gpu_screen_recorder_info(&gsr_info); if(gsr_info_exit_status != gsr::GsrInfoExitStatus::OK) { - fprintf(stderr, "error: failed to get gpu-screen-recorder info, error: %d\n", (int)gsr_info_exit_status); + fprintf(stderr, "Error: failed to get gpu-screen-recorder info, error: %d\n", (int)gsr_info_exit_status); exit(1); } const gsr::DisplayServer display_server = gsr_info.system_info.display_server; if(display_server == gsr::DisplayServer::WAYLAND) - fprintf(stderr, "warning: Wayland support is experimental and requires XWayland. Things may not work as expected.\n"); + fprintf(stderr, "Warning: Wayland support is experimental and requires XWayland. Things may not work as expected.\n"); gsr::SupportedCaptureOptions capture_options = gsr::get_supported_capture_options(gsr_info); @@ -198,7 +198,7 @@ int main(void) { exit(1); } - fprintf(stderr, "info: gsr ui is now ready, waiting for inputs. Press alt+z to show/hide the overlay\n"); + fprintf(stderr, "Info: gsr ui is now ready, waiting for inputs. Press alt+z to show/hide the overlay\n"); auto overlay = std::make_unique<gsr::Overlay>(resources_path, std::move(gsr_info), std::move(capture_options), egl_funcs); //overlay.show(); @@ -207,11 +207,11 @@ int main(void) { if(display_server == gsr::DisplayServer::X11) { global_hotkeys = register_x11_hotkeys(overlay.get()); if(!global_hotkeys) { - fprintf(stderr, "info: failed to register some x11 hotkeys because they are registered by another program. Will use linux hotkeys instead that can clash with keys used by other applications\n"); + fprintf(stderr, "Info: failed to register some x11 hotkeys because they are registered by another program. Will use linux hotkeys instead that can clash with keys used by other applications\n"); global_hotkeys = register_linux_hotkeys(overlay.get()); } } else { - fprintf(stderr, "info: Global linux hotkeys are used which can clash with keys used by other applications. Use X11 instead if this is an issue for you\n"); + fprintf(stderr, "Info: Global linux hotkeys are used which can clash with keys used by other applications. Use X11 instead if this is an issue for you\n"); global_hotkeys = register_linux_hotkeys(overlay.get()); } @@ -230,7 +230,7 @@ int main(void) { } } - fprintf(stderr, "info: shutting down!\n"); + fprintf(stderr, "Info: shutting down!\n"); overlay.reset(); gsr::deinit_theme(); gsr::deinit_color_theme(); |