File: macosx.py

package info (click to toggle)
pygame 2.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,076 kB
  • sloc: ansic: 66,932; python: 48,797; javascript: 1,153; objc: 224; sh: 121; makefile: 59; cpp: 25
file content (13 lines) | stat: -rw-r--r-- 329 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
import platform
import os
import sys

__all__ = ["Video_AutoInit"]


def Video_AutoInit():
    """Called from the base.c just before display module is initialized."""
    if "Darwin" in platform.platform():
        if (os.getcwd() == "/") and len(sys.argv) > 1:
            os.chdir(os.path.dirname(sys.argv[0]))
    return True