launcher_dosbox.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:games_nebula 作者: yancharkin 项目源码 文件源码
def launch_game(self):

        output = self.combobox_monitor.get_active_text().split()[0]
        os.system('xrandr --output '+ output + ' --primary')

        self.main_window.hide()

        while Gtk.events_pending():
            Gtk.main_iteration()

        dosbox_bin = self.set_dosbox_bin()

        self.create_link()

        launch_command = dosbox_bin + ' -conf ' + \
        os.getenv('HOME') + '/.games_nebula/config/dosbox.conf' + \
        ' -conf ' + self.install_dir + '/' + self.game_name + '/dosbox.conf' + \
        ' -conf ' + self.install_dir + '/' + self.game_name + '/dosbox_game.conf'

        os.system(self.command_before)
        os.system('export SDL_VIDEO_FULLSCREEN_HEAD=0 && ' + launch_command)
        os.system(self.command_after)

        output = self.monitor_primary.split()[0]
        os.system('xrandr --output '+ output + ' --primary')

        self.config_save()

        sys.exit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号