Get the window resolution */
| 51 | |
| 52 | /* Get the window resolution */ |
| 53 | int 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 | |
| 71 | int Lua::Gui::text(lua_State *L) |
| 72 | { |
nothing calls this directly
no test coverage detected