[NEW] Cursor can be hidden from game.ini
This commit is contained in:
3
mini.cpp
3
mini.cpp
@@ -19,6 +19,7 @@ char window_title[256];
|
||||
uint16_t screen_width = 160;
|
||||
uint16_t screen_height = 120;
|
||||
uint8_t screen_zoom = 4;
|
||||
uint8_t show_cursor = SDL_ENABLE;
|
||||
|
||||
surface_t surfaces[10];
|
||||
surface_t *screen_surface = &surfaces[0];
|
||||
@@ -101,6 +102,7 @@ void read_ini() {
|
||||
else if (strcmp(line, "width") == 0) screen_width = atoi(value);
|
||||
else if (strcmp(line, "height") == 0) screen_height = atoi(value);
|
||||
else if (strcmp(line, "zoom") == 0) screen_zoom = atoi(value);
|
||||
else if (strcmp(line, "hidemouse") == 0) show_cursor = SDL_DISABLE;
|
||||
else if (strcmp(line, "files") == 0) {
|
||||
lua_files = (char*)malloc(strlen(value));
|
||||
strcpy(lua_files, value);
|
||||
@@ -232,6 +234,7 @@ int main(int argc,char*argv[]){
|
||||
mini_ren = SDL_CreateRenderer(mini_win, -1, SDL_RENDERER_PRESENTVSYNC);
|
||||
//SDL_CreateWindowAndRenderer(512,512,0,&mini_win,&mini_ren);
|
||||
SDL_RenderSetLogicalSize(mini_ren, screen_width, screen_height);
|
||||
SDL_ShowCursor(show_cursor);
|
||||
mini_bak = SDL_CreateTexture(mini_ren, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, screen_width, screen_height);
|
||||
bool exit = false;
|
||||
SDL_Event mini_eve;
|
||||
|
||||
Reference in New Issue
Block a user