mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-04-08 04:18:08 +09:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
269d55d7eb | ||
|
|
c04e6a87e6 | ||
|
|
d8acac6ba9 | ||
|
|
010d4dd5aa | ||
|
|
e1397c1c97 |
@@ -31,7 +31,7 @@ These are the dependencies needed to build GPU Screen Recorder UI:
|
||||
## Runtime dependencies
|
||||
There are also additional dependencies needed at runtime:
|
||||
|
||||
* [GPU Screen Recorder](https://git.dec05eba.com/gpu-screen-recorder/) (version 5.0.0 or greater)
|
||||
* [GPU Screen Recorder](https://git.dec05eba.com/gpu-screen-recorder/) (version 5.0.0 or later)
|
||||
* [GPU Screen Recorder Notification](https://git.dec05eba.com/gpu-screen-recorder-notification/)
|
||||
|
||||
## Program behavior notes
|
||||
@@ -45,8 +45,8 @@ This software is licensed under GPL3.0-only. Files under `fonts/` directory belo
|
||||
[](https://www.youtube.com/watch?v=SOqXusCTXXA)
|
||||
|
||||
# Screenshots
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Donations
|
||||
If you want to donate you can donate via bitcoin or monero.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
project('gsr-ui', ['c', 'cpp'], version : '1.1.2', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends')
|
||||
project('gsr-ui', ['c', 'cpp'], version : '1.1.3', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends')
|
||||
|
||||
if get_option('buildtype') == 'debug'
|
||||
add_project_arguments('-g3', language : ['c', 'cpp'])
|
||||
@@ -52,7 +52,7 @@ datadir = get_option('datadir')
|
||||
gsr_ui_resources_path = join_paths(prefix, datadir, 'gsr-ui')
|
||||
|
||||
add_project_arguments('-DGSR_UI_VERSION="' + meson.project_version() + '"', language: ['c', 'cpp'])
|
||||
add_project_arguments('-DGSR_FLATPAK_VERSION="5.1.0"', language: ['c', 'cpp'])
|
||||
add_project_arguments('-DGSR_FLATPAK_VERSION="5.1.2"', language: ['c', 'cpp'])
|
||||
|
||||
executable(
|
||||
meson.project_name(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "gsr-ui"
|
||||
type = "executable"
|
||||
version = "1.1.2"
|
||||
version = "1.1.3"
|
||||
platforms = ["posix"]
|
||||
|
||||
[lang.cpp]
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <limits.h>
|
||||
#include <inttypes.h>
|
||||
#include <libgen.h>
|
||||
#include <iostream>
|
||||
#include <mglpp/window/Keyboard.hpp>
|
||||
|
||||
#define FORMAT_I32 "%" PRIi32
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace gsr {
|
||||
{
|
||||
if(icon_texture && icon_texture->is_valid()) {
|
||||
icon_sprite.set_texture(icon_texture);
|
||||
icon_sprite.set_height((int)(size.y * 0.5f));
|
||||
icon_sprite.set_height((int)(size.y * 0.45f));
|
||||
}
|
||||
this->description.set_color(mgl::Color(150, 150, 150));
|
||||
}
|
||||
@@ -242,4 +242,4 @@ namespace gsr {
|
||||
update_if_dirty();
|
||||
return size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,11 +153,14 @@ namespace gsr {
|
||||
title_text.set_position(mgl::vec2f(bg_rect.get_position() + mgl::vec2f(bg_rect.get_size().x*0.5f - title_text.get_bounds().size.x*0.5f, padding_vertical)).floor());
|
||||
window.draw(title_text);
|
||||
|
||||
//const float description_bottom = description_text.get_position().y + description_text.get_bounds().size.y;
|
||||
//const float remaining_height = (bg_rect.get_position().y + bg_rect.get_size().y) - description_bottom;
|
||||
hotkey_text.set_position(mgl::vec2f(bg_rect.get_position() + bg_rect.get_size()*0.5f - hotkey_text.get_bounds().size*0.5f).floor());
|
||||
window.draw(hotkey_text);
|
||||
|
||||
const float caret_padding_x = int(0.001f * get_theme().window_height);
|
||||
const mgl::vec2f caret_size = mgl::vec2f(std::max(2.0f, 0.002f * get_theme().window_height), hotkey_text.get_bounds().size.y).floor();
|
||||
mgl::Rectangle caret_rect(hotkey_text.get_position() + mgl::vec2f(hotkey_text.get_bounds().size.x + caret_padding_x, hotkey_text.get_bounds().size.y*0.5f - caret_size.y*0.5f).floor(), caret_size);
|
||||
window.draw(caret_rect);
|
||||
|
||||
description_text.set_position(mgl::vec2f(bg_rect.get_position() + mgl::vec2f(bg_rect.get_size().x*0.5f - description_text.get_bounds().size.x*0.5f, bg_rect.get_size().y - description_text.get_bounds().size.y - padding_vertical)).floor());
|
||||
window.draw(description_text);
|
||||
};
|
||||
@@ -580,6 +583,7 @@ namespace gsr {
|
||||
content_page_ptr->set_visible(false);
|
||||
hotkey_overlay_ptr->set_visible(true);
|
||||
overlay->unbind_all_keyboard_hotkeys();
|
||||
configure_hotkey_get_button_by_active_type()->set_text("");
|
||||
|
||||
switch(hotkey_type) {
|
||||
case ConfigureHotkeyType::NONE:
|
||||
@@ -646,4 +650,4 @@ namespace gsr {
|
||||
hotkey_overlay_ptr->set_visible(false);
|
||||
overlay->rebind_all_keyboard_hotkeys();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,18 +286,18 @@ static bool keyboard_event_try_add_device_if_keyboard(keyboard_event *self, cons
|
||||
|
||||
unsigned long evbit = 0;
|
||||
ioctl(fd, EVIOCGBIT(0, sizeof(evbit)), &evbit);
|
||||
const bool is_keyboard = evbit & (1 << EV_KEY);
|
||||
const bool is_keyboard = (evbit & (1 << EV_SYN)) && (evbit & (1 << EV_KEY)) && (evbit & (1 << EV_MSC)) && (evbit & (1 << EV_REP));
|
||||
|
||||
if(is_keyboard && strcmp(device_name, GSR_UI_VIRTUAL_KEYBOARD_NAME) != 0) {
|
||||
unsigned char key_bits[KEY_MAX/8 + 1] = {0};
|
||||
ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), &key_bits);
|
||||
|
||||
const bool supports_key_events = key_bits[KEY_A/8] & (1 << (KEY_A % 8));
|
||||
const bool supports_mouse_events = key_bits[BTN_MOUSE/8] & (1 << (BTN_MOUSE % 8));
|
||||
//const bool supports_mouse_events = key_bits[BTN_MOUSE/8] & (1 << (BTN_MOUSE % 8));
|
||||
//const bool supports_touch_events = key_bits[BTN_TOUCH/8] & (1 << (BTN_TOUCH % 8));
|
||||
const bool supports_joystick_events = key_bits[BTN_JOYSTICK/8] & (1 << (BTN_JOYSTICK % 8));
|
||||
const bool supports_wheel_events = key_bits[BTN_WHEEL/8] & (1 << (BTN_WHEEL % 8));
|
||||
if(supports_key_events && !supports_mouse_events && !supports_joystick_events && !supports_wheel_events) {
|
||||
if(supports_key_events && !supports_joystick_events && !supports_wheel_events) {
|
||||
unsigned char *key_states = calloc(1, KEY_STATES_SIZE);
|
||||
if(key_states && self->num_event_polls < MAX_EVENT_POLLS) {
|
||||
//fprintf(stderr, "%s (%s) supports key inputs\n", dev_input_filepath, device_name);
|
||||
@@ -389,14 +389,20 @@ static int setup_virtual_keyboard_input(const char *name) {
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_SYN) != -1);
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_MSC) != -1);
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_KEY) != -1);
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_REP) != -1);
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_REL) != -1);
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_LED) != -1);
|
||||
|
||||
success &= (ioctl(fd, UI_SET_MSCBIT, MSC_SCAN) != -1);
|
||||
for(int i = 1; i < KEY_MAX; ++i) {
|
||||
success &= (ioctl(fd, UI_SET_KEYBIT, i) != -1);
|
||||
}
|
||||
|
||||
success &= (ioctl(fd, UI_SET_EVBIT, EV_REL) != -1);
|
||||
success &= (ioctl(fd, UI_SET_RELBIT, REL_X) != -1);
|
||||
success &= (ioctl(fd, UI_SET_RELBIT, REL_Y) != -1);
|
||||
success &= (ioctl(fd, UI_SET_RELBIT, REL_Z) != -1);
|
||||
for(int i = 0; i < REL_MAX; ++i) {
|
||||
success &= (ioctl(fd, UI_SET_RELBIT, i) != -1);
|
||||
}
|
||||
for(int i = 0; i < LED_MAX; ++i) {
|
||||
success &= (ioctl(fd, UI_SET_LEDBIT, i) != -1);
|
||||
}
|
||||
|
||||
// success &= (ioctl(fd, UI_SET_EVBIT, EV_ABS) != -1);
|
||||
// success &= (ioctl(fd, UI_SET_ABSBIT, ABS_X) != -1);
|
||||
|
||||
Reference in New Issue
Block a user