Ejemplo n.º 1
0
def get_deviceinfo():
    from knossos import clibs

    clibs.init_sdl()
    clibs.init_openal()

    if clibs.can_detect_audio():
        audio_devs = clibs.list_audio_devs()
    else:
        audio_devs = None

    return {
        'modes': clibs.get_modes(),
        'audio_devs': audio_devs,
        'voices': clibs.list_voices()
    }
Ejemplo n.º 2
0
    print(cpuinfo._actual_get_cpu_info_from_cpuid())
elif len(sys.argv) > 1 and sys.argv[1] == '--deviceinfo':
    import json
    from knossos import clibs

    clibs.init_sdl()
    clibs.init_openal()

    if clibs.can_detect_audio():
        audio_devs = clibs.list_audio_devs()
    else:
        audio_devs = None

    print(json.dumps({
        'modes': clibs.get_modes(),
        'audio_devs': audio_devs,
        'joysticks': clibs.list_joysticks()
    }))
elif len(sys.argv) > 1 and sys.argv[1] == '--fso-config-path':
    from knossos import clibs

    clibs.init_sdl()
    print(clibs.get_config_path())
elif len(sys.argv) > 1 and sys.argv[1] == '--lib-paths':
    import json
    from knossos import clibs, center

    if len(sys.argv) > 3:
        if sys.argv[2] == 'auto':
            center.settings['sdl2_path'] = None
Ejemplo n.º 3
0
    print(json.dumps(info))
elif len(sys.argv) > 1 and sys.argv[1] == '--deviceinfo':
    import json
    from knossos import clibs

    clibs.init_sdl()
    clibs.init_openal()

    if clibs.can_detect_audio():
        audio_devs = clibs.list_audio_devs()
    else:
        audio_devs = None

    print(
        json.dumps({
            'modes': clibs.get_modes(),
            'audio_devs': audio_devs,
            'joysticks': clibs.list_joysticks()
        }))
elif len(sys.argv) > 1 and sys.argv[1] == '--fso-config-path':
    from knossos import clibs

    clibs.init_sdl()
    print(clibs.get_config_path())
elif len(sys.argv) > 1 and sys.argv[1] == '--lib-paths':
    import json
    from knossos import clibs, center

    if len(sys.argv) > 3:
        if sys.argv[2] == 'auto':
            center.settings['sdl2_path'] = None