[UI+Backend] Fixed playlist menu pausing and added minor improvements.
This commit is contained in:
parent
e7c0e1af92
commit
13b4b53e9d
|
@ -16,6 +16,12 @@
|
|||
#include "discord_rpc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <QX11Info>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
void
|
||||
|
@ -90,13 +96,19 @@ public:
|
|||
.h = fbo->height(),
|
||||
.internal_format = 0 };
|
||||
int flip_y{ 0 };
|
||||
|
||||
#ifdef __linux__
|
||||
Display* dpy = QX11Info::display();
|
||||
#endif
|
||||
mpv_render_param params[] = {
|
||||
// Specify the default framebuffer (0) as target. This will
|
||||
// render onto the entire screen. If you want to show the video
|
||||
// in a smaller rectangle or apply fancy transformations, you'll
|
||||
// need to render into a separate FBO and draw it manually.
|
||||
{ MPV_RENDER_PARAM_OPENGL_FBO, &mpfbo },
|
||||
#ifdef __linux__
|
||||
{ MPV_RENDER_PARAM_X11_DISPLAY, dpy },
|
||||
#endif
|
||||
|
||||
// Flip rendering (needed due to flipped GL coordinate system).
|
||||
{ MPV_RENDER_PARAM_FLIP_Y, &flip_y },
|
||||
{ MPV_RENDER_PARAM_INVALID, nullptr }
|
||||
|
|
|
@ -116,9 +116,6 @@ main(int argc, char* argv[])
|
|||
"/usr/bin:" + QProcessEnvironment::systemEnvironment().value("PATH", "");
|
||||
setenv("PATH", newpath.toUtf8().constData(), 1);
|
||||
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_NativeWindows);
|
||||
|
||||
qmlRegisterUncreatableMetaObject(
|
||||
Enums::staticMetaObject, // static meta object
|
||||
"player", // import statement (can be any string)
|
||||
|
|
|
@ -13,11 +13,9 @@ Dialog {
|
|||
width: 720
|
||||
modality: Qt.NonModal
|
||||
Component.onCompleted: {
|
||||
player.titleChanged.connect(updatePlaylistMenu)
|
||||
player.playlistChanged.connect(updatePlaylistMenu)
|
||||
}
|
||||
function updatePlaylistMenu() {
|
||||
var playlist = player.playerCommand(Enums.Commands.GetPlaylist)
|
||||
function updatePlaylistMenu(playlist) {
|
||||
playlistModel.clear()
|
||||
for (var thing in playlist) {
|
||||
var item = playlist[thing]
|
||||
|
|
|
@ -9,12 +9,13 @@ import player 1.0
|
|||
|
||||
import "codes.js" as LanguageCodes
|
||||
|
||||
ApplicationWindow {
|
||||
Window {
|
||||
id: mainWindow
|
||||
title: titleLabel.text
|
||||
visible: true
|
||||
width: 720
|
||||
height: 480
|
||||
|
||||
Translator {
|
||||
id: translate
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue