目次 - SDL 3.0 API(機能別) - ディスプレイとウィンドウ - SDL_GetCurrentDisplayOrientation

SDL_GetCurrentDisplayOrientation

ディスプレイの方向を得る

ヘッダ

SDL3/SDL_video.h

構文

SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID);

引数

SDL_DisplayIDdisplayID問い合わせるディスプレイのインスタンスID

戻り値

(SDL_DisplayOrientation) ディスプレイのSDL_DisplayOrientation列挙体の値を戻す. 得られなかったときSDL_ORIENTATION_UNKNOWNを戻す.

詳細

この関数とSDL_GetDesktopDisplayMode()は, SDLがフルスクリーンで, かつ解像度を変えたとき異なる. その場合, この関数は変更前ではなく変更後のディスプレイモードを戻す.

スレッドセーフ

この関数を呼べるのはメインスレッドのみである.

関連項目

バージョン

SDL 3.2.0以降

SDL Wikiへのリンク

SDL_GetCurrentDisplayOrientation - SDL Wiki