Skip to main content

set_game_geometry

Function set_game_geometry 

Source
pub unsafe fn set_game_geometry(
    callback: retro_environment_t,
    geometry: retro_game_geometry,
) -> bool
Expand description

Sets a new game_geometry structure.

This environment call is similar to set_system_av_info for changing video parameters, but provides a guarantee that drivers will not be reinitialized.

The purpose of this call is to allow a core to alter nominal width/heights as well as aspect ratios on-the-fly, which can be useful for some emulators to change in run-time.

max_width/max_height arguments are ignored and cannot be changed with this call as this could potentially require a reinitialization or a non-constant time operation. If max_width/max_height are to be changed, set_system_av_info is required.

A frontend must guarantee that this environment call completes in constant time.