mirror of
https://github.com/clockworkpi/launcher_deot.git
synced 2026-01-27 02:14:43 +01:00
Update config.py (Sync Ver.200626)
This commit is contained in:
parent
d27090dfbd
commit
53acfc0001
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import platform
|
||||
from UI.util_funcs import FileExists,ArmSystem
|
||||
from UI.util_funcs import FileExists,ArmSystem,ReadTheFileContent
|
||||
from pyaria2_rpc.pyaria2 import Xmlrpc
|
||||
|
||||
CurKeySet = "GameShell" ## >>> PC or GameShell <<<
|
||||
@ -10,16 +10,19 @@ DontLeave = False
|
||||
|
||||
BackLight = "/proc/driver/backlight"
|
||||
Battery = "/sys/class/power_supply/axp20x-battery/uevent"
|
||||
FB_Modes = "/sys/class/graphics/fb0/modes"
|
||||
|
||||
MPD_socket = "/tmp/mpd.socket"
|
||||
|
||||
UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI_DEOT/master/version.json"
|
||||
#UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI_DEOT/master/version.json"
|
||||
# disable update
|
||||
UPDATE_URL=""
|
||||
|
||||
VERSION="stable 1.25"
|
||||
VERSION="D.E.O.T. v2+ 200626"
|
||||
|
||||
SKIN=None
|
||||
|
||||
ButtonsLayout="xbox"
|
||||
ButtonsLayout="snes"
|
||||
|
||||
RPC = None
|
||||
## three timer values in seconds: dim screen, close screen,PowerOff
|
||||
@ -32,8 +35,11 @@ PowerLevels["balance_saving"] = [40,0,0]
|
||||
|
||||
PowerLevel = "balance_saving"
|
||||
|
||||
GlobalCanvas=None
|
||||
GlobalScale = 1
|
||||
|
||||
def PreparationInAdv():
|
||||
global SKIN,ButtonsLayout
|
||||
global SKIN,ButtonsLayout,FB_Modes,GlobalScale
|
||||
global PowerLevel
|
||||
global RPC
|
||||
if SKIN != None:
|
||||
@ -73,7 +79,17 @@ def PreparationInAdv():
|
||||
else:
|
||||
ArmSystem("sudo iw wlan0 set power_save off >/dev/null")
|
||||
|
||||
RPC = Xmlrpc('localhost', 6800)
|
||||
if FileExists(FB_Modes):
|
||||
modes = ReadTheFileContent(FB_Modes)
|
||||
if "320x240" in modes:
|
||||
GlobalScale = 1
|
||||
if "640x480" in modes:
|
||||
GlobalScale = 2
|
||||
if "480x640" in modes:
|
||||
GlobalScale = 2
|
||||
else:
|
||||
GlobalScale = 1
|
||||
|
||||
RPC = Xmlrpc('localhost', 6800)
|
||||
PreparationInAdv()
|
||||
##sys.py/.powerlevel
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user