table taseditor.getselection()
| 5241 | |
| 5242 | // table taseditor.getselection() |
| 5243 | static int taseditor_getselection(lua_State *L) |
| 5244 | { |
| 5245 | #ifdef __WIN_DRIVER__ |
| 5246 | // create temp vector and provide its reference to TAS Editor for filling the vector with data |
| 5247 | std::vector<int> cur_set; |
| 5248 | taseditor_lua.getselection(cur_set); |
| 5249 | int size = cur_set.size(); |
| 5250 | if (size) |
| 5251 | { |
| 5252 | lua_createtable(L, size, 0); |
| 5253 | for (int i = 0; i < size; ++i) |
| 5254 | { |
| 5255 | lua_pushinteger(L, cur_set[i]); |
| 5256 | lua_rawseti(L, -2, i + 1); |
| 5257 | } |
| 5258 | } else |
| 5259 | { |
| 5260 | lua_pushnil(L); |
| 5261 | } |
| 5262 | #else |
| 5263 | lua_pushnil(L); |
| 5264 | #endif |
| 5265 | return 1; |
| 5266 | } |
| 5267 | |
| 5268 | // taseditor.setselection(table new_set) |
| 5269 | static int taseditor_setselection(lua_State *L) |
nothing calls this directly
no test coverage detected