MCPcopy Create free account
hub / github.com/clementgallet/libTAS / resolution

Method resolution

src/program/lua/Gui.cpp:53–69  ·  view source on GitHub ↗

Get the window resolution */

Source from the content-addressed store, hash-verified

51
52/* Get the window resolution */
53int Lua::Gui::resolution(lua_State *L)
54{
55 sendMessage(MSGN_LUA_RESOLUTION);
56
57 /* Get the resolution */
58 int message = receiveMessage();
59 if (message != MSGB_LUA_RESOLUTION) {
60 std::cerr << "Wrong result after asking for lua game resolution" << std::endl;
61 exit(1);
62 }
63 int w, h;
64 receiveData(&w, sizeof(int));
65 receiveData(&h, sizeof(int));
66 lua_pushinteger(L, static_cast<lua_Integer>(w));
67 lua_pushinteger(L, static_cast<lua_Integer>(h));
68 return 2;
69}
70
71int Lua::Gui::text(lua_State *L)
72{

Callers

nothing calls this directly

Calls 3

sendMessageFunction · 0.85
receiveMessageFunction · 0.85
receiveDataFunction · 0.85

Tested by

no test coverage detected