cleanup and disabled nonfunctional scrolling code

This commit is contained in:
itsmattkc
2019-02-16 03:23:09 -08:00
parent 6bccd0c660
commit 2f38a0b111
70 changed files with 383 additions and 583 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ QString LabelSlider::valueToString() {
} else {
switch (display_type) {
case LABELSLIDER_FRAMENUMBER:
return frame_to_timecode(long(v), config.timecode_view, frame_rate);
return frame_to_timecode(long(v), Olive::CurrentConfig.timecode_view, frame_rate);
case LABELSLIDER_PERCENT:
return QString::number((v*100), 'f', decimal_places).append("%");
case LABELSLIDER_DECIBEL:
@@ -274,7 +274,7 @@ void LabelSlider::mouseReleaseEvent(QMouseEvent*) {
if (s.isEmpty()) return;
// parse string timecode to a frame number
d = timecode_to_frame(s, config.timecode_view, frame_rate);
d = timecode_to_frame(s, Olive::CurrentConfig.timecode_view, frame_rate);
} else {
+8 -8
View File
@@ -100,23 +100,23 @@ void MenuHelper::set_titlesafe_from_menu() {
if (qIsNaN(tsa)) {
// disable title safe area
config.show_title_safe_area = false;
Olive::CurrentConfig.show_title_safe_area = false;
} else {
// using title safe area
config.show_title_safe_area = true;
Olive::CurrentConfig.show_title_safe_area = true;
// are we using the default area aspect ratio, or a specific one
if (qIsNull(tsa)) {
// default title safe area
config.use_custom_title_safe_ratio = false;
Olive::CurrentConfig.use_custom_title_safe_ratio = false;
} else {
// using a specific aspect ratio
config.use_custom_title_safe_ratio = true;
Olive::CurrentConfig.use_custom_title_safe_ratio = true;
if (tsa < 0.0) {
@@ -136,13 +136,13 @@ void MenuHelper::set_titlesafe_from_menu() {
if (!input.isEmpty()) {
QStringList inputList = input.split(':');
config.custom_title_safe_ratio = inputList.at(0).toDouble()/inputList.at(1).toDouble();
Olive::CurrentConfig.custom_title_safe_ratio = inputList.at(0).toDouble()/inputList.at(1).toDouble();
}
} else {
// specified tsa is a specific custom aspect ratio
config.custom_title_safe_ratio = tsa;
Olive::CurrentConfig.custom_title_safe_ratio = tsa;
}
}
@@ -154,7 +154,7 @@ void MenuHelper::set_titlesafe_from_menu() {
void MenuHelper::set_autoscroll() {
QAction* action = static_cast<QAction*>(sender());
config.autoscroll = action->data().toInt();
Olive::CurrentConfig.autoscroll = action->data().toInt();
}
void MenuHelper::menu_click_button() {
@@ -163,7 +163,7 @@ void MenuHelper::menu_click_button() {
void MenuHelper::set_timecode_view() {
QAction* action = static_cast<QAction*>(sender());
config.timecode_view = action->data().toInt();
Olive::CurrentConfig.timecode_view = action->data().toInt();
update_ui(false);
}
+3 -3
View File
@@ -112,7 +112,7 @@ void process_effect(Clip* c,
if (e->enable_coords) {
e->process_coords(timecode, coords, data);
}
bool can_process_shaders = (e->enable_shader && runtime_config.shaders_are_enabled);
bool can_process_shaders = (e->enable_shader && Olive::CurrentRuntimeConfig.shaders_are_enabled);
if (can_process_shaders || e->enable_superimpose) {
e->startEffect();
if (can_process_shaders && e->is_glsl_linked()) {
@@ -506,7 +506,7 @@ GLuint compose_sequence(ComposeSequenceParams &params) {
// copy front buffer to back buffer (only if we're using blending modes - which we usually will be)
if (!runtime_config.disable_blending) {
if (!Olive::CurrentRuntimeConfig.disable_blending) {
if (params.nests.size() > 0) {
draw_clip(params.ctx, params.nests.last()->fbo[2]->handle(), params.nests.last()->fbo[0]->texture(), true);
} else {
@@ -523,7 +523,7 @@ GLuint compose_sequence(ComposeSequenceParams &params) {
// bind front buffer as draw buffer
params.ctx->functions()->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, final_fbo);
if (runtime_config.disable_blending) {
if (Olive::CurrentRuntimeConfig.disable_blending) {
// some GPUs don't like the blending shader, so we provide a pure GL fallback here
params.ctx->functions()->glBindTexture(GL_TEXTURE_2D, backend_tex_1);
+25 -15
View File
@@ -42,7 +42,7 @@ struct ComposeSequenceParams {
*
* Primarily used for calling Viewer::play_wake() when appropriate.
*/
Viewer* viewer;
Viewer* viewer;
/**
* @brief The OpenGL context to use while rendering.
@@ -51,7 +51,7 @@ struct ComposeSequenceParams {
*
* \see ComposeSequenceParams::video
*/
QOpenGLContext* ctx;
QOpenGLContext* ctx;
/**
* @brief The sequence to compose
@@ -59,7 +59,7 @@ struct ComposeSequenceParams {
* In addition to clips, sequences also contain the playhead position so compose_sequence() knows which frame
* to render.
*/
Sequence* seq;
Sequence* seq;
/**
* @brief Array to store the nested sequence hierarchy
@@ -67,7 +67,7 @@ struct ComposeSequenceParams {
* Should be left empty. This array gets passed around compose_sequence() as it calls itself recursively to
* handle nested sequences.
*/
QVector<Clip*> nests;
QVector<Clip*> nests;
/**
* @brief Set compose mode to video or audio
@@ -82,7 +82,7 @@ struct ComposeSequenceParams {
* A pointer to a pointer that will be set to the Effect whose gizmos are being rendered and should therefore
* be interacted with if the user uses them.
*/
Effect** gizmos;
Effect** gizmos;
/**
* @brief A variable that compose_sequence() will set to **TRUE** if any of the clips couldn't be shown.
@@ -104,7 +104,7 @@ struct ComposeSequenceParams {
* This may be preferable. See ComposeSequenceParams::single_threaded for a similar function that could be
* removed.
*/
bool texture_failed;
bool texture_failed;
/**
* @brief Run all cachers in the same thread that compose_sequence() is in
@@ -129,7 +129,7 @@ struct ComposeSequenceParams {
*
* \see ComposeSequenceParams::video
*/
int playback_speed;
int playback_speed;
/**
* @brief Blending mode shader
@@ -142,7 +142,7 @@ struct ComposeSequenceParams {
*
* \see ComposeSequenceParams::video
*/
QOpenGLShaderProgram* blend_mode_program;
QOpenGLShaderProgram* blend_mode_program;
/**
* @brief Premultiply alpha shader
@@ -154,7 +154,7 @@ struct ComposeSequenceParams {
* premultiplied (see Footage::alpha_is_premultiplied) using this shader. Must be compiled and linked beforehand.
* See RenderThread::premultiply_program for how this is properly set up.
*/
QOpenGLShaderProgram* premultiply_program;
QOpenGLShaderProgram* premultiply_program;
/**
* @brief The OpenGL framebuffer object that the final texture to be shown is rendered to.
@@ -163,7 +163,7 @@ struct ComposeSequenceParams {
*
* When compose_sequence() is rendering the final image, this framebuffer will be bound.
*/
GLuint main_buffer;
GLuint main_buffer;
/**
* @brief The attachment to the framebuffer in main_buffer
@@ -172,7 +172,7 @@ struct ComposeSequenceParams {
*
* The OpenGL texture attached to the framebuffer referenced by main_buffer.
*/
GLuint main_attachment;
GLuint main_attachment;
/**
* @brief Backend OpenGL framebuffer 1 used for further processing before rendering to main_buffer
@@ -180,7 +180,7 @@ struct ComposeSequenceParams {
* In some situations, compose_sequence() will do some processing through shaders that requires "ping-ponging"
* between framebuffers. backend_buffer1 and backend_buffer2 are used for this purpose.
*/
GLuint backend_buffer1;
GLuint backend_buffer1;
/**
* @brief Backend OpenGL framebuffer 1's texture attachment
@@ -188,7 +188,7 @@ struct ComposeSequenceParams {
* The texture that ComposeSequenceParams::backend_buffer1 renders to. Bound and drawn to
* ComposeSequenceParams::backend_buffer2 to "ping-pong" between them and various shaders.
*/
GLuint backend_attachment1;
GLuint backend_attachment1;
/**
* @brief Backend OpenGL framebuffer 2 used for further processing before rendering to main_buffer
@@ -196,7 +196,7 @@ struct ComposeSequenceParams {
* In some situations, compose_sequence() will do some processing through shaders that requires "ping-ponging"
* between framebuffers. backend_buffer1 and backend_buffer2 are used for this purpose.
*/
GLuint backend_buffer2;
GLuint backend_buffer2;
/**
* @brief Backend OpenGL framebuffer 2's texture attachment
@@ -204,7 +204,17 @@ struct ComposeSequenceParams {
* The texture that ComposeSequenceParams::backend_buffer2 renders to. Bound and drawn to
* ComposeSequenceParams::backend_buffer1 to "ping-pong" between them and various shaders.
*/
GLuint backend_attachment2;
GLuint backend_attachment2;
/**
* @brief OpenGL shader containing OpenColorIO shader information
*/
QOpenGLShaderProgram* ocio_shader;
/**
* @brief OpenGL texture containing LUT obtained form OpenColorIO
*/
GLuint ocio_lut_texture;
};
/**
+6
View File
@@ -29,6 +29,12 @@
#include "playback/playback.h"
#include "project/sequence.h"
// copied from source code to OCIODisplay
#define LUT3D_EDGE_SIZE 32
// copied from source code to OCIODisplay, expanded from 3*LUT3D_EDGE_SIZE*LUT3D_EDGE_SIZE*LUT3D_EDGE_SIZE
#define NUM_3D_ENTRIES 98304
RenderThread::RenderThread() :
front_buffer(0),
front_texture(0),
+8
View File
@@ -29,6 +29,12 @@
#include <QOpenGLFramebufferObject>
#include <QOpenGLShaderProgram>
// copied from source code to OCIODisplay
#define LUT3D_EDGE_SIZE 32
// copied from source code to OCIODisplay, expanded from 3*LUT3D_EDGE_SIZE*LUT3D_EDGE_SIZE*LUT3D_EDGE_SIZE
#define NUM_3D_ENTRIES 98304
struct Sequence;
class Effect;
@@ -70,6 +76,8 @@ private:
GLuint back_texture_1;
GLuint back_texture_2;
float ocio_lut_data[NUM_3D_ENTRIES];
Sequence* seq;
int divider;
int tex_width;
+1 -1
View File
@@ -30,7 +30,7 @@
ScrollArea::ScrollArea(QWidget* parent) : QScrollArea(parent) {}
void ScrollArea::wheelEvent(QWheelEvent *e) {
if (config.scroll_zooms) {
if (Olive::CurrentConfig.scroll_zooms) {
e->ignore();
if (e->angleDelta().y() > 0) {
+5 -5
View File
@@ -372,14 +372,14 @@ void TimelineHeader::paintEvent(QPaintEvent*) {
// draw text
bool draw_text = false;
if (text_enabled && lineX-textWidth > lastTextBoundary) {
timecode = frame_to_timecode(frame + in_visible, config.timecode_view, viewer->seq->frame_rate);
timecode = frame_to_timecode(frame + in_visible, Olive::CurrentConfig.timecode_view, viewer->seq->frame_rate);
fullTextWidth = fm.width(timecode);
textWidth = fullTextWidth>>1;
text_x = lineX;
// centers the text to that point on the timeline, LEFT aligns it if not
if (config.center_timeline_timecodes) {
if (Olive::CurrentConfig.center_timeline_timecodes) {
text_x -= textWidth;
} else {
text_x += TEXT_PADDING_FROM_LINE;
@@ -399,7 +399,7 @@ void TimelineHeader::paintEvent(QPaintEvent*) {
// draw line markers
p.setPen(Qt::gray);
p.drawLine(lineX, (!config.center_timeline_timecodes && draw_text) ? 0 : yoff, lineX, height());
p.drawLine(lineX, (!Olive::CurrentConfig.center_timeline_timecodes && draw_text) ? 0 : yoff, lineX, height());
// draw sub-line markers
for (int j=1;j<sublineCount;j++) {
@@ -463,8 +463,8 @@ void TimelineHeader::show_context_menu(const QPoint &pos) {
QAction* center_timecodes = menu.addAction(tr("Center Timecodes"), Olive::MainWindow, SLOT(toggle_bool_action()));
center_timecodes->setCheckable(true);
center_timecodes->setChecked(config.center_timeline_timecodes);
center_timecodes->setData(reinterpret_cast<quintptr>(&config.center_timeline_timecodes));
center_timecodes->setChecked(Olive::CurrentConfig.center_timeline_timecodes);
center_timecodes->setData(reinterpret_cast<quintptr>(&Olive::CurrentConfig.center_timeline_timecodes));
menu.exec(mapToGlobal(pos));
}
+21 -27
View File
@@ -30,7 +30,6 @@
#include "ui/sourceiconview.h"
#include "project/undo.h"
#include "ui/viewerwidget.h"
#include "dialogs/stabilizerdialog.h"
#include "ui/resizablescrollbar.h"
#include "dialogs/newsequencedialog.h"
#include "mainwindow.h"
@@ -207,9 +206,9 @@ void TimelineWidget::tooltip_timer_timeout() {
QToolTip::showText(QCursor::pos(),
tr("%1\nStart: %2\nEnd: %3\nDuration: %4").arg(
c->name,
frame_to_timecode(c->timeline_in, config.timecode_view, Olive::ActiveSequence->frame_rate),
frame_to_timecode(c->timeline_out, config.timecode_view, Olive::ActiveSequence->frame_rate),
frame_to_timecode(c->getLength(), config.timecode_view, Olive::ActiveSequence->frame_rate)
frame_to_timecode(c->timeline_in, Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate),
frame_to_timecode(c->timeline_out, Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate),
frame_to_timecode(c->getLength(), Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate)
));
}
}
@@ -242,11 +241,6 @@ void TimelineWidget::rename_clip() {
}
}
void TimelineWidget::show_stabilizer_diag() {
StabilizerDialog sd;
sd.exec();
}
void TimelineWidget::open_sequence_properties() {
QList<Media*> sequence_items;
QList<Media*> all_top_level_items;
@@ -291,7 +285,7 @@ void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
}
}
if (config.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
if (Olive::CurrentConfig.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
QList<QUrl> urls = event->mimeData()->urls();
if (!urls.isEmpty()) {
QStringList file_list;
@@ -385,7 +379,7 @@ void TimelineWidget::wheelEvent(QWheelEvent *event) {
int scroll_amount = alt ? (event->angleDelta().x()) : (event->angleDelta().y());
bool in = (scroll_amount > 0);
if (config.scroll_zooms != shift) {
if (Olive::CurrentConfig.scroll_zooms != shift) {
// if config.scroll_zooms is enabled or shift is held, zoom instead of scrolling
if (in) {
@@ -710,7 +704,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
s.track = clip->track;
Olive::ActiveSequence->selections.append(s);
if (config.select_also_seeks) {
if (Olive::CurrentConfig.select_also_seeks) {
panel_sequence_viewer->seek(clip->timeline_in);
}
@@ -749,7 +743,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
panel_timeline->drag_y_start = pos.y();
break;
case TIMELINE_TOOL_EDIT:
if (config.edit_tool_also_seeks) panel_sequence_viewer->seek(panel_timeline->drag_frame_start);
if (Olive::CurrentConfig.edit_tool_also_seeks) panel_sequence_viewer->seek(panel_timeline->drag_frame_start);
panel_timeline->selecting = true;
break;
case TIMELINE_TOOL_RAZOR:
@@ -844,7 +838,7 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
add.append(c);
ca->append(new AddClipCommand(Olive::ActiveSequence, add));
if (c->track < 0 && config.add_default_effects_to_clips) {
if (c->track < 0 && Olive::CurrentConfig.add_default_effects_to_clips) {
// default video effects (before custom effects)
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_TRANSFORM, EFFECT_TYPE_EFFECT)));
}
@@ -876,7 +870,7 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
break;
}
if (c->track >= 0 && config.add_default_effects_to_clips) {
if (c->track >= 0 && Olive::CurrentConfig.add_default_effects_to_clips) {
// default audio effects (after custom effects)
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_VOLUME, EFFECT_TYPE_EFFECT)));
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_PAN, EFFECT_TYPE_EFFECT)));
@@ -1615,9 +1609,9 @@ void TimelineWidget::update_ghosts(const QPoint& mouse_pos, bool lock_frame) {
}
if (panel_timeline->importing) {
QToolTip::showText(mapToGlobal(mouse_pos), frame_to_timecode(earliest_in_point, config.timecode_view, Olive::ActiveSequence->frame_rate));
QToolTip::showText(mapToGlobal(mouse_pos), frame_to_timecode(earliest_in_point, Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate));
} else {
QString tip = ((frame_diff < 0) ? "-" : "+") + frame_to_timecode(qAbs(frame_diff), config.timecode_view, Olive::ActiveSequence->frame_rate);
QString tip = ((frame_diff < 0) ? "-" : "+") + frame_to_timecode(qAbs(frame_diff), Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate);
if (panel_timeline->trim_target > -1) {
// find which clip is being moved
const Ghost* g = nullptr;
@@ -1636,7 +1630,7 @@ void TimelineWidget::update_ghosts(const QPoint& mouse_pos, bool lock_frame) {
} else {
len += frame_diff;
}
tip += frame_to_timecode(len, config.timecode_view, Olive::ActiveSequence->frame_rate);
tip += frame_to_timecode(len, Olive::CurrentConfig.timecode_view, Olive::ActiveSequence->frame_rate);
}
}
QToolTip::showText(mapToGlobal(mouse_pos), tip);
@@ -1656,7 +1650,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
if (!panel_timeline->moving_init) track_resizing = false;
if (isLiveEditing()) {
panel_timeline->snap_to_timeline(&panel_timeline->cursor_frame, !config.edit_tool_also_seeks || !panel_timeline->selecting, true, true);
panel_timeline->snap_to_timeline(&panel_timeline->cursor_frame, !Olive::CurrentConfig.edit_tool_also_seeks || !panel_timeline->selecting, true, true);
}
if (panel_timeline->selecting) {
int selection_count = 1 + qMax(panel_timeline->cursor_track, panel_timeline->drag_track_start) - qMin(panel_timeline->cursor_track, panel_timeline->drag_track_start) + panel_timeline->selection_offset;
@@ -1674,7 +1668,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
}
// select linked clips too
if (config.edit_tool_selects_links) {
if (Olive::CurrentConfig.edit_tool_selects_links) {
for (int j=0;j<Olive::ActiveSequence->clips.size();j++) {
Clip* c = Olive::ActiveSequence->clips.at(j);
for (int k=0;k<Olive::ActiveSequence->selections.size();k++) {
@@ -1710,7 +1704,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
}
}
if (config.edit_tool_also_seeks) {
if (Olive::CurrentConfig.edit_tool_also_seeks) {
panel_sequence_viewer->seek(qMin(panel_timeline->drag_frame_start, panel_timeline->cursor_frame));
} else {
panel_timeline->repaint_timeline();
@@ -2208,7 +2202,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
int mouse_pos = pos.y() + scroll;
if (mouse_pos > y_test_value-test_range && mouse_pos < y_test_value+test_range) {
// if track lines are hidden, only resize track if a clip is already there
if (config.show_track_lines || cursor_contains_clip) {
if (Olive::CurrentConfig.show_track_lines || cursor_contains_clip) {
found = true;
track_resizing = true;
track_target = track;
@@ -2306,7 +2300,7 @@ void draw_waveform(Clip* clip, const FootageStream* ms, long media_length, QPain
}
for (int j=0;j<ms->audio_channels;j++) {
int mid = (config.rectified_waveforms) ? clip_rect.top()+channel_height*(j+1) : clip_rect.top()+channel_height*j+(channel_height/2);
int mid = (Olive::CurrentConfig.rectified_waveforms) ? clip_rect.top()+channel_height*(j+1) : clip_rect.top()+channel_height*j+(channel_height/2);
int offset_range_start = last_waveform_index+(j*2);
int offset_range_end = waveform_index+(j*2);
@@ -2323,7 +2317,7 @@ void draw_waveform(Clip* clip, const FootageStream* ms, long media_length, QPain
}
// draw waveforms
if (config.rectified_waveforms) {
if (Olive::CurrentConfig.rectified_waveforms) {
// rectified waveforms start from the bottom and draw upwards
p->drawLine(clip_rect.left()+i, mid, clip_rect.left()+i, mid - (max - min));
@@ -2695,7 +2689,7 @@ void TimelineWidget::paintEvent(QPaintEvent*) {
}
// Draw track lines
if (config.show_track_lines) {
if (Olive::CurrentConfig.show_track_lines) {
p.setPen(QColor(0, 0, 0, 96));
audio_track_limit++;
if (video_track_limit == 0) video_track_limit--;
@@ -2842,7 +2836,7 @@ int TimelineWidget::getTrackFromScreenPoint(int y) {
int counter = ((!bottom_align && y > 0) || (bottom_align && y < 0)) ? 0 : -1;
int track_height = panel_timeline->calculate_track_height(counter, -1);
while (qAbs(y) > height_measure+track_height) {
if (config.show_track_lines && counter != -1) y--;
if (Olive::CurrentConfig.show_track_lines && counter != -1) y--;
height_measure += track_height;
if ((!bottom_align && y > 0) || (bottom_align && y < 0)) {
counter++;
@@ -2861,7 +2855,7 @@ int TimelineWidget::getScreenPointFromTrack(int track) {
if (bottom_align) counter--;
y += panel_timeline->calculate_track_height(counter, -1);
if (!bottom_align) counter++;
if (config.show_track_lines && counter != -1) y++;
if (Olive::CurrentConfig.show_track_lines && counter != -1) y++;
}
y++;
return (bottom_align) ? height() - y - scroll : y - scroll;
+1 -2
View File
@@ -103,8 +103,7 @@ private slots:
void show_context_menu(const QPoint& pos);
void toggle_autoscale();
void tooltip_timer_timeout();
void rename_clip();
void show_stabilizer_diag();
void rename_clip();
void open_sequence_properties();
};
+5 -5
View File
@@ -426,11 +426,11 @@ void ViewerWidget::draw_title_safe_area() {
double viewportAr = (double) width() / (double) height();
double halfAr = viewportAr*0.5;
if (config.use_custom_title_safe_ratio && config.custom_title_safe_ratio > 0) {
if (config.custom_title_safe_ratio > viewportAr) {
halfHeight = (config.custom_title_safe_ratio/viewportAr)*0.5;
if (Olive::CurrentConfig.use_custom_title_safe_ratio && Olive::CurrentConfig.custom_title_safe_ratio > 0) {
if (Olive::CurrentConfig.custom_title_safe_ratio > viewportAr) {
halfHeight = (Olive::CurrentConfig.custom_title_safe_ratio/viewportAr)*0.5;
} else {
halfWidth = (viewportAr/config.custom_title_safe_ratio)*0.5;
halfWidth = (viewportAr/Olive::CurrentConfig.custom_title_safe_ratio)*0.5;
}
}
@@ -609,7 +609,7 @@ void ViewerWidget::paintGL() {
glBindTexture(GL_TEXTURE_2D, 0);
// draw title/action safe area
if (config.show_title_safe_area) {
if (Olive::CurrentConfig.show_title_safe_area) {
draw_title_safe_area();
}