aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-11 19:51:57 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-11 19:58:30 +0200
commit7d6732a7d3d286507ce11565bd4736fa3b94659c (patch)
treef568b4acf186c15fcd1cf4af01808ac0fcb15194
parentc6942aaa9a9cd87ac1615214788ea6a09cfe0a4c (diff)
Only allow x11 for now
-rw-r--r--TODO6
-rw-r--r--gpu-screen-recorder-overlay-daemon/main.c2
-rw-r--r--src/gui/FileChooser.cpp5
-rw-r--r--src/gui/SettingsPage.cpp8
-rw-r--r--src/main.cpp5
5 files changed, 17 insertions, 9 deletions
diff --git a/TODO b/TODO
index da9d264..d176470 100644
--- a/TODO
+++ b/TODO
@@ -33,8 +33,10 @@ Move hotkey to gsr-overlay-daemon which should execute gpu-screen-recorder --inf
Combobox shouldn't show all items if its the combobox at the bottom and scrolling is needed to show them all.
-Filechooser should have the option to select list view, search bar and common folders/mounted drives on the left side for quick navigation.
+Filechooser should have the option to select list view, search bar and common folders/mounted drives on the left side for quick navigation. Also a button to create a new directory.
Start recording/replay/streaming with correct data from settings.
Save recording/replay/streaming status to file.
-Save gsr info data to file to quick re-open. \ No newline at end of file
+Save gsr info data to file to quick re-open.
+
+Support wayland (excluding gnome, or force xwayland on gnome). \ No newline at end of file
diff --git a/gpu-screen-recorder-overlay-daemon/main.c b/gpu-screen-recorder-overlay-daemon/main.c
index e243efe..bce9f2f 100644
--- a/gpu-screen-recorder-overlay-daemon/main.c
+++ b/gpu-screen-recorder-overlay-daemon/main.c
@@ -80,6 +80,8 @@ int main(void) {
pid_t overlay_pid = -1;
+ fprintf(stderr, "gsr overlay is now ready, waiting for inputs. Press alt+z to show/hide the overlay\n");
+
XEvent xev;
for(;;) {
XNextEvent(display, &xev);
diff --git a/src/gui/FileChooser.cpp b/src/gui/FileChooser.cpp
index 994993c..a48a3b0 100644
--- a/src/gui/FileChooser.cpp
+++ b/src/gui/FileChooser.cpp
@@ -28,6 +28,7 @@ namespace gsr {
static const float content_padding_right_scale = 0.03f;
static const float content_margin_left_scale = 0.005f;
static const float content_margin_right_scale = 0.005f;
+ static const float folder_text_spacing_scale = 0.005f;
static const float up_button_spacing_scale = 0.01f;
FileChooserBody::FileChooserBody(FileChooser *file_chooser, mgl::vec2f size) :
@@ -84,8 +85,8 @@ namespace gsr {
auto &folder = folders[i];
mgl::Sprite folder_sprite(&get_theme().folder_texture);
- folder_sprite.set_position(folder_pos.floor());
folder_sprite.set_width((int)folder_width);
+ folder_sprite.set_position((folder_pos - mgl::vec2f(0.0f, folder_sprite.get_size().y * 0.3f)).floor());
const mgl::vec2f item_pos = folder_pos - mgl::vec2f(content_padding_left, content_padding_top);
const mgl::vec2f item_size = folder_sprite.get_size() + mgl::vec2f(content_padding_left + content_padding_right, content_padding_top + content_padding_bottom);
@@ -111,7 +112,7 @@ namespace gsr {
// TODO: Dont allow text to go further left/right than item_pos (on the left side) and item_pos + item_size (on the right side).
folder.text.set_max_width(item_size.x);
folder.text.set_max_rows(2);
- folder.text.set_position(folder_sprite.get_position() + mgl::vec2f(folder_sprite.get_size().x * 0.5f - folder.text.get_bounds().size.x * 0.5f, folder_sprite.get_size().y));
+ folder.text.set_position((folder_sprite.get_position() + mgl::vec2f(folder_sprite.get_size().x * 0.5f - folder.text.get_bounds().size.x * 0.5f, folder_sprite.get_size().y + folder_text_spacing_scale * get_theme().window_height)).floor());
window.draw(folder.text);
}
diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp
index 8304147..b7e87d2 100644
--- a/src/gui/SettingsPage.cpp
+++ b/src/gui/SettingsPage.cpp
@@ -486,7 +486,7 @@ namespace gsr {
audio_codec_ptr->set_visible(advanced_view);
video_codec_ptr->set_visible(advanced_view);
framerate_mode_list_ptr->set_visible(advanced_view);
- notifications_subsection_ptr->set_visible(advanced_view);
+ //notifications_subsection_ptr->set_visible(advanced_view);
settings_scrollable_page_ptr->reset_scroll();
};
view_radio_button_ptr->on_selection_changed("Simple", "simple");
@@ -521,7 +521,7 @@ namespace gsr {
audio_codec_ptr->set_visible(advanced_view);
video_codec_ptr->set_visible(advanced_view);
framerate_mode_list_ptr->set_visible(advanced_view);
- notifications_subsection_ptr->set_visible(advanced_view);
+ //notifications_subsection_ptr->set_visible(advanced_view);
settings_scrollable_page_ptr->reset_scroll();
};
view_radio_button_ptr->on_selection_changed("Simple", "simple");
@@ -574,9 +574,7 @@ namespace gsr {
std::unique_ptr<ComboBox> SettingsPage::create_stream_container_box() {
auto container_box = std::make_unique<ComboBox>(&get_theme().body_font);
container_box->add_item("mp4", "mp4");
- container_box->add_item("mkv", "matroska");
container_box->add_item("flv", "flv");
- container_box->add_item("mov", "mov");
container_box->add_item("ts", "mpegts");
container_box->add_item("m3u8", "hls");
container_box_ptr = container_box.get();
@@ -635,7 +633,7 @@ namespace gsr {
audio_codec_ptr->set_visible(advanced_view);
video_codec_ptr->set_visible(advanced_view);
framerate_mode_list_ptr->set_visible(advanced_view);
- notifications_subsection_ptr->set_visible(advanced_view);
+ //notifications_subsection_ptr->set_visible(advanced_view);
settings_scrollable_page_ptr->reset_scroll();
};
view_radio_button_ptr->on_selection_changed("Simple", "simple");
diff --git a/src/main.cpp b/src/main.cpp
index fca2f87..120280d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -63,6 +63,11 @@ int main(int argc, char **argv) {
exit(1);
}
+ if(gsr_info.system_info.display_server == gsr::DisplayServer::WAYLAND) {
+ fprintf(stderr, "error: Wayland is currently not supported\n");
+ exit(1);
+ }
+
std::string resources_path;
if(access("images/gpu_screen_recorder_logo.png", F_OK) == 0) {
resources_path = "./";