Render: getDisplayDimensions

getDisplayDimensions()
  • Returns the width and height of the display resolution in pixels

Return Type: 
  • integer list: [ width, height ]
    Note:
    • Returns the width and height of the display resolution in pixels
       
    • Doesn't return the width and height of the game window
    Sample Code

    ################  get the monitor resolution

    # import bge module
    import bge

    # get the render module
    rend = bge.render

    # get display resolution
    resolution = rend.getDisplayDimensions()