Added ugly set_mode to fix pygame shit
This commit is contained in:
		
							parent
							
								
									befe9c19fe
								
							
						
					
					
						commit
						5f58043207
					
				| @ -21,11 +21,12 @@ WINDOW_WIDTH = 1024 | |||||||
| WINDOW_HEIGHT = 1024 | WINDOW_HEIGHT = 1024 | ||||||
| 
 | 
 | ||||||
| def resize(width, height): | def resize(width, height): | ||||||
|     print((width, height)) |  | ||||||
| 
 |  | ||||||
|     length = min(width, height) |     length = min(width, height) | ||||||
|     offset = int( math.fabs(width - height) / 2) |     offset = int( math.fabs(width - height) / 2) | ||||||
| 
 | 
 | ||||||
|  |     # Ugly AF | ||||||
|  |     pg.display.set_mode((width, height), pg.DOUBLEBUF | pg.RESIZABLE | pg.OPENGL) | ||||||
|  | 
 | ||||||
|     if width < height: |     if width < height: | ||||||
|         gl.glViewport(0, offset, length, length) |         gl.glViewport(0, offset, length, length) | ||||||
|     else: |     else: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user