mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 08:45:00 +00:00 
			
		
		
		
	use screen resolution instead of canvas size
This commit is contained in:
		
							parent
							
								
									791b946a42
								
							
						
					
					
						commit
						c68cac89df
					
				| 
						 | 
					@ -134,15 +134,17 @@ int
 | 
				
			||||||
Emscripten_VideoInit(_THIS)
 | 
					Emscripten_VideoInit(_THIS)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    SDL_DisplayMode mode;
 | 
					    SDL_DisplayMode mode;
 | 
				
			||||||
    double css_w, css_h;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Use a fake 32-bpp desktop mode */
 | 
					    /* Use a fake 32-bpp desktop mode */
 | 
				
			||||||
    mode.format = SDL_PIXELFORMAT_RGB888;
 | 
					    mode.format = SDL_PIXELFORMAT_RGB888;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    emscripten_get_element_css_size(NULL, &css_w, &css_h);
 | 
					    mode.w = EM_ASM_INT_V({
 | 
				
			||||||
 | 
					        return screen.width;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mode.w = css_w;
 | 
					    mode.h = EM_ASM_INT_V({
 | 
				
			||||||
    mode.h = css_h;
 | 
					        return screen.height;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mode.refresh_rate = 0;
 | 
					    mode.refresh_rate = 0;
 | 
				
			||||||
    mode.driverdata = NULL;
 | 
					    mode.driverdata = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue