mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 08:36:17 +00:00 
			
		
		
		
	[Renderers/Raylib] Fix FLAG_HIGHDPI causing window resize to break
This commit is contained in:
		
							parent
							
								
									1204ac400b
								
							
						
					
					
						commit
						3f635cdd79
					
				| 
						 | 
				
			
			@ -495,7 +495,7 @@ main :: proc() {
 | 
			
		|||
    clay.Initialize(arena, {cast(f32)raylib.GetScreenWidth(), cast(f32)raylib.GetScreenHeight()}, { handler = errorHandler })
 | 
			
		||||
    clay.SetMeasureTextFunction(measureText, nil)
 | 
			
		||||
 | 
			
		||||
    raylib.SetConfigFlags({.VSYNC_HINT, .WINDOW_RESIZABLE, .WINDOW_HIGHDPI, .MSAA_4X_HINT})
 | 
			
		||||
    raylib.SetConfigFlags({.VSYNC_HINT, .WINDOW_RESIZABLE, .MSAA_4X_HINT})
 | 
			
		||||
    raylib.InitWindow(windowWidth, windowHeight, "Raylib Odin Example")
 | 
			
		||||
    raylib.SetTargetFPS(raylib.GetMonitorRefreshRate(0))
 | 
			
		||||
    loadFont(FONT_ID_TITLE_56, 56, "resources/Calistoga-Regular.ttf")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,7 +226,7 @@ int main(void) {
 | 
			
		|||
    uint64_t totalMemorySize = Clay_MinMemorySize();
 | 
			
		||||
    Clay_Arena clayMemory = Clay_CreateArenaWithCapacityAndMemory(totalMemorySize, malloc(totalMemorySize));
 | 
			
		||||
    Clay_Initialize(clayMemory, (Clay_Dimensions) { (float)GetScreenWidth(), (float)GetScreenHeight() }, (Clay_ErrorHandler) { HandleClayErrors, 0 });
 | 
			
		||||
    Clay_Raylib_Initialize(1024, 768, "Clay - Raylib Renderer Example", FLAG_VSYNC_HINT | FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_HIGHDPI | FLAG_MSAA_4X_HINT);
 | 
			
		||||
    Clay_Raylib_Initialize(1024, 768, "Clay - Raylib Renderer Example", FLAG_VSYNC_HINT | FLAG_WINDOW_RESIZABLE | FLAG_MSAA_4X_HINT);
 | 
			
		||||
    profilePicture = LoadTexture("resources/profile-picture.png");
 | 
			
		||||
 | 
			
		||||
    Font fonts[2];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue