commit
95d73ea234
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -n "${1}" ]; then
|
if [ -n "${1}" ]; then
|
||||||
|
if [ ! -f "${1}" ]; then
|
||||||
|
echo "${1} does not exist"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
echo "Generating python file for ${1}"
|
echo "Generating python file for ${1}"
|
||||||
pyuic5 "${1}" -x -o "${1%.ui}.py"
|
pyuic5 "${1}" -x -o "${1%.ui}.py"
|
||||||
sed '/QtCore.QMetaObject.connectSlotsByName/d' -i "${1%.ui}.py"
|
sed '/QtCore.QMetaObject.connectSlotsByName/d' -i "${1%.ui}.py"
|
||||||
|
@ -13,6 +17,10 @@ cd "$(dirname "$0")"/.. || exit
|
||||||
changed="$(git diff --name-only HEAD | grep '\.ui')"
|
changed="$(git diff --name-only HEAD | grep '\.ui')"
|
||||||
|
|
||||||
for ui in $changed; do
|
for ui in $changed; do
|
||||||
|
if [ ! -f "$ui" ]; then
|
||||||
|
echo "$ui does not exist. Skipping"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
echo "Generating python file for ${ui}"
|
echo "Generating python file for ${ui}"
|
||||||
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
|
pyuic5 "${ui}" -x -o "${ui%.ui}.py"
|
||||||
sed '/QtCore.QMetaObject.connectSlotsByName/d' -i "${ui%.ui}.py"
|
sed '/QtCore.QMetaObject.connectSlotsByName/d' -i "${ui%.ui}.py"
|
||||||
|
|
|
@ -3,7 +3,7 @@ import random
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot, QObject, QEvent, QTimer
|
from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot, QObject, QEvent, QTimer
|
||||||
from PyQt5.QtGui import QMouseEvent, QShowEvent
|
from PyQt5.QtGui import QMouseEvent, QShowEvent, QPaintEvent
|
||||||
from PyQt5.QtWidgets import QMessageBox, QAction
|
from PyQt5.QtWidgets import QMessageBox, QAction
|
||||||
|
|
||||||
from rare.models.game import RareGame
|
from rare.models.game import RareGame
|
||||||
|
@ -106,11 +106,21 @@ class GameWidget(LibraryWidget):
|
||||||
# lk: attributes as `GameWidgetUi` class
|
# lk: attributes as `GameWidgetUi` class
|
||||||
__slots__ = "ui"
|
__slots__ = "ui"
|
||||||
|
|
||||||
|
def paintEvent(self, a0: QPaintEvent) -> None:
|
||||||
|
if not self.visibleRegion().isNull() and self.rgame.pixmap.isNull():
|
||||||
|
self.startTimer(random.randrange(42, 2361, 129), Qt.CoarseTimer)
|
||||||
|
# self.startTimer(random.randrange(42, 2361, 363), Qt.VeryCoarseTimer)
|
||||||
|
# self.rgame.load_pixmap()
|
||||||
|
# QTimer.singleShot(random.randrange(42, 2361, 7), Qt.VeryCoarseTimer, self.rgame.load_pixmap)
|
||||||
|
super().paintEvent(a0)
|
||||||
|
|
||||||
|
def timerEvent(self, a0):
|
||||||
|
self.killTimer(a0.timerId())
|
||||||
|
self.rgame.load_pixmap()
|
||||||
|
|
||||||
def showEvent(self, a0: QShowEvent) -> None:
|
def showEvent(self, a0: QShowEvent) -> None:
|
||||||
if a0.spontaneous():
|
if a0.spontaneous():
|
||||||
return super().showEvent(a0)
|
return super().showEvent(a0)
|
||||||
if self.rgame.pixmap.isNull():
|
|
||||||
QTimer.singleShot(random.randrange(42, 361, 7), self.rgame.load_pixmap)
|
|
||||||
super().showEvent(a0)
|
super().showEvent(a0)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
|
|
|
@ -65,6 +65,10 @@ class EGLSyncGroup(QGroupBox):
|
||||||
self.ui.egl_sync_check.setChecked(self.core.egl_sync_enabled)
|
self.ui.egl_sync_check.setChecked(self.core.egl_sync_enabled)
|
||||||
self.ui.egl_sync_check.stateChanged.connect(self.egl_sync_changed)
|
self.ui.egl_sync_check.stateChanged.connect(self.egl_sync_changed)
|
||||||
|
|
||||||
|
# lk: Temporarily disable automatic sync with EGL
|
||||||
|
self.ui.egl_sync_check_label.setHidden(True)
|
||||||
|
self.ui.egl_sync_check.setHidden(True)
|
||||||
|
|
||||||
self.import_list = EGLSyncImportGroup(parent=self)
|
self.import_list = EGLSyncImportGroup(parent=self)
|
||||||
self.ui.import_export_layout.addWidget(self.import_list)
|
self.ui.import_export_layout.addWidget(self.import_list)
|
||||||
self.export_list = EGLSyncExportGroup(parent=self)
|
self.export_list = EGLSyncExportGroup(parent=self)
|
||||||
|
|
|
@ -31,7 +31,7 @@ class LegendaryCore(LegendaryCoreReal):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(LegendaryCore, self).__init__(*args, **kwargs)
|
super(LegendaryCore, self).__init__(*args, **kwargs)
|
||||||
self.log.info("Using Rare's LegendaryCore monkey")
|
self.log.info("Using Rare's LegendaryCore monkey")
|
||||||
self.log.info("Using config in %s", self.lgd.path.replace(os.getlogin(), "<username>"))
|
self.log.info("Using config in %s", self.lgd.path)
|
||||||
self.handler = LgndrLogHandler(logging.CRITICAL)
|
self.handler = LgndrLogHandler(logging.CRITICAL)
|
||||||
self.log.addHandler(self.handler)
|
self.log.addHandler(self.handler)
|
||||||
|
|
||||||
|
|
|
@ -165,9 +165,14 @@ class RareCore(QObject):
|
||||||
self.__core.lgd.config.set(
|
self.__core.lgd.config.set(
|
||||||
"Legendary", "mac_install_dir", self.__core.get_default_install_dir(self.__core.default_platform)
|
"Legendary", "mac_install_dir", self.__core.get_default_install_dir(self.__core.default_platform)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Always set these options
|
# Always set these options
|
||||||
# Avoid falling back to Windows games on macOS
|
# Avoid implicitly falling back to Windows games on macOS
|
||||||
self.__core.lgd.config.set("Legendary", "install_platform_fallback", 'false')
|
self.__core.lgd.config.set("Legendary", "install_platform_fallback", str(False))
|
||||||
|
# Force-disable automatic use of crossover on macOS (remove this when we support crossover)
|
||||||
|
self.__core.lgd.config.set("Legendary", "disable_auto_crossover", str(True))
|
||||||
|
# Force-disable automatic sync with EGL, it seems to have issues
|
||||||
|
self.__core.lgd.config.set("Legendary", "egl_sync", str(False))
|
||||||
|
|
||||||
# workaround if egl sync enabled, but no programdata_path
|
# workaround if egl sync enabled, but no programdata_path
|
||||||
# programdata_path might be unset if logging in through the browser
|
# programdata_path might be unset if logging in through the browser
|
||||||
|
|
Loading…
Reference in a new issue