GUI: remember window size
This commit is contained in:
		
							parent
							
								
									ab814604b5
								
							
						
					
					
						commit
						adbe70fa05
					
				|  | @ -5356,6 +5356,9 @@ bool FurnaceGUI::init() { | ||||||
|   SDL_Surface* icon=SDL_CreateRGBSurfaceFrom(furIcon,256,256,32,256*4,0xff,0xff00,0xff0000,0xff000000); |   SDL_Surface* icon=SDL_CreateRGBSurfaceFrom(furIcon,256,256,32,256*4,0xff,0xff00,0xff0000,0xff000000); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |   scrW=e->getConfInt("lastWindowWidth",1280); | ||||||
|  |   scrH=e->getConfInt("lastWindowHeight",800); | ||||||
|  | 
 | ||||||
|   SDL_Rect displaySize; |   SDL_Rect displaySize; | ||||||
| 
 | 
 | ||||||
|   sdlWin=SDL_CreateWindow("Furnace",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,scrW*dpiScale,scrH*dpiScale,SDL_WINDOW_RESIZABLE|SDL_WINDOW_ALLOW_HIGHDPI); |   sdlWin=SDL_CreateWindow("Furnace",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,scrW*dpiScale,scrH*dpiScale,SDL_WINDOW_RESIZABLE|SDL_WINDOW_ALLOW_HIGHDPI); | ||||||
|  | @ -5450,6 +5453,10 @@ bool FurnaceGUI::finish() { | ||||||
|   e->setConf("mixerOpen",mixerOpen); |   e->setConf("mixerOpen",mixerOpen); | ||||||
|   e->setConf("oscOpen",oscOpen); |   e->setConf("oscOpen",oscOpen); | ||||||
| 
 | 
 | ||||||
|  |   // commit last window size
 | ||||||
|  |   e->setConf("lastWindowWidth",scrW); | ||||||
|  |   e->setConf("lastWindowHeight",scrH); | ||||||
|  | 
 | ||||||
|   for (int i=0; i<DIV_MAX_CHANS; i++) { |   for (int i=0; i<DIV_MAX_CHANS; i++) { | ||||||
|     delete oldPat[i]; |     delete oldPat[i]; | ||||||
|   } |   } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 tildearrow
						tildearrow