set vsync swap interval * Set the vsync swap interval. The interval with which to swap the front and back buffers * in sync with vertical blanks (v-blank), the hardware event where the screen image is updated * with data from the front buffer. A value of 1 swaps the buffers at every v-blank, a value of * 2 swaps the buffers every other v-blank and so on. A value of 0 disables waiti
| 1339 | * ``` |
| 1340 | */ |
| 1341 | static int Sys_SetVsyncSwapInterval(lua_State* L) |
| 1342 | { |
| 1343 | DM_LUA_STACK_CHECK(L, 0); |
| 1344 | |
| 1345 | dmSystemDDF::SetVsync msg; |
| 1346 | msg.m_SwapInterval = luaL_checkinteger(L, 1); |
| 1347 | |
| 1348 | dmMessage::URL url; |
| 1349 | GetSystemURL(&url); |
| 1350 | |
| 1351 | dmMessage::Result result = dmMessage::Post(0, &url, dmSystemDDF::SetVsync::m_DDFDescriptor->m_NameHash, 0, (uintptr_t) dmSystemDDF::SetVsync::m_DDFDescriptor, &msg, sizeof(msg), 0); |
| 1352 | assert(result == dmMessage::RESULT_OK); |
| 1353 | |
| 1354 | return 0; |
| 1355 | } |
| 1356 | |
| 1357 | /*# set update frequency |
| 1358 | * Set game update-frequency (frame cap). This option is equivalent to `display.update_frequency` in |
nothing calls this directly
no test coverage detected