MCPcopy Create free account
hub / github.com/defold/defold / RenderScript_GetWindowWidth

Function RenderScript_GetWindowWidth

engine/render/src/render/render_script.cpp:2630–2636  ·  view source on GitHub ↗

gets the actual window width * * Returns the actual physical window width. * Note that this value might differ from the logical width that is set in the * "game.project" settings. * * @name render.get_window_width * @return width [type:number] actual window width * @examples * * Get the actual width of the window * * ```lua * local w

Source from the content-addressed store, hash-verified

2628 * ```
2629 */
2630 int RenderScript_GetWindowWidth(lua_State* L)
2631 {
2632 RenderScriptInstance* i = RenderScriptInstance_Check(L);
2633 (void)i;
2634 lua_pushnumber(L, dmGraphics::GetWindowWidth(i->m_RenderContext->m_GraphicsContext));
2635 return 1;
2636 }
2637
2638 /*# gets the actual window height
2639 *

Callers

nothing calls this directly

Calls 3

lua_pushnumberFunction · 0.85
GetWindowWidthFunction · 0.50

Tested by

no test coverage detected