Now looks just perfect
This commit is contained in:
parent
2d843fcd27
commit
9aa5d56830
@ -138,7 +138,7 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
|
|||||||
organise_dialog_(new OrganiseDialog(task_manager_)),
|
organise_dialog_(new OrganiseDialog(task_manager_)),
|
||||||
queue_manager_(new QueueManager),
|
queue_manager_(new QueueManager),
|
||||||
#ifdef ENABLE_WIIMOTEDEV
|
#ifdef ENABLE_WIIMOTEDEV
|
||||||
wiimotedev_buttons(0),
|
wiimotedev_buttons_(0),
|
||||||
wiimotedev_iface_(NULL),
|
wiimotedev_iface_(NULL),
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_VISUALISATIONS
|
#ifdef ENABLE_VISUALISATIONS
|
||||||
@ -1430,32 +1430,31 @@ void MainWindow::PlaylistCopyToDevice() {
|
|||||||
|
|
||||||
#ifdef ENABLE_WIIMOTEDEV
|
#ifdef ENABLE_WIIMOTEDEV
|
||||||
void MainWindow::DbusWiimoteButtons(quint32 id, quint64 value) {
|
void MainWindow::DbusWiimoteButtons(quint32 id, quint64 value) {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
|
|
||||||
quint64 buttons = value & ~WIIMOTE_TILT_MASK;
|
quint64 buttons = value & ~WIIMOTE_TILT_MASK;
|
||||||
if (wiimotedev_buttons == buttons) return;
|
if (wiimotedev_buttons_ == buttons) return;
|
||||||
|
|
||||||
if ((!(wiimotedev_buttons & WIIMOTE_BTN_SHIFT_LEFT) &&
|
if ((!(wiimotedev_buttons_ & WIIMOTE_BTN_SHIFT_LEFT) &&
|
||||||
(value & WIIMOTE_BTN_SHIFT_LEFT)) ||
|
(value & WIIMOTE_BTN_SHIFT_LEFT)) ||
|
||||||
(!(wiimotedev_buttons & WIIMOTE_BTN_LEFT) &&
|
(!(wiimotedev_buttons_ & WIIMOTE_BTN_LEFT) &&
|
||||||
(value & WIIMOTE_BTN_LEFT))) player_->Previous();
|
(value & WIIMOTE_BTN_LEFT))) player_->Previous();
|
||||||
|
|
||||||
|
|
||||||
if ((!(wiimotedev_buttons & WIIMOTE_BTN_SHIFT_RIGHT) &&
|
if ((!(wiimotedev_buttons_ & WIIMOTE_BTN_SHIFT_RIGHT) &&
|
||||||
(value & WIIMOTE_BTN_SHIFT_RIGHT)) ||
|
(value & WIIMOTE_BTN_SHIFT_RIGHT)) ||
|
||||||
(!(wiimotedev_buttons & WIIMOTE_BTN_RIGHT) &&
|
(!(wiimotedev_buttons_ & WIIMOTE_BTN_RIGHT) &&
|
||||||
(value & WIIMOTE_BTN_RIGHT))) player_->Next();
|
(value & WIIMOTE_BTN_RIGHT))) player_->Next();
|
||||||
|
|
||||||
if (!(wiimotedev_buttons & WIIMOTE_BTN_PLUS) &&
|
if (!(wiimotedev_buttons_ & WIIMOTE_BTN_PLUS) &&
|
||||||
(value & WIIMOTE_BTN_PLUS)) player_->VolumeUp();
|
(value & WIIMOTE_BTN_PLUS)) player_->VolumeUp();
|
||||||
|
|
||||||
if (!(wiimotedev_buttons & WIIMOTE_BTN_MINUS) &&
|
if (!(wiimotedev_buttons_ & WIIMOTE_BTN_MINUS) &&
|
||||||
(value & WIIMOTE_BTN_MINUS)) player_->VolumeDown();
|
(value & WIIMOTE_BTN_MINUS)) player_->VolumeDown();
|
||||||
|
|
||||||
if (!(wiimotedev_buttons & WIIMOTE_BTN_A) &&
|
if (!(wiimotedev_buttons_ & WIIMOTE_BTN_A) &&
|
||||||
(value & WIIMOTE_BTN_A)) player_->PlayPause();
|
(value & WIIMOTE_BTN_A)) player_->PlayPause();
|
||||||
|
|
||||||
wiimotedev_buttons = buttons;
|
wiimotedev_buttons_ = buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -217,7 +217,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
|
|
||||||
#ifdef ENABLE_WIIMOTEDEV
|
#ifdef ENABLE_WIIMOTEDEV
|
||||||
DBusDeviceEventsInterface* wiimotedev_iface_;
|
DBusDeviceEventsInterface* wiimotedev_iface_;
|
||||||
quint64 wiimotedev_buttons;
|
quint64 wiimotedev_buttons_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMenu* playlist_menu_;
|
QMenu* playlist_menu_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user