Skip to content

Commit aa6fcf1

Browse files
committed
Fix examples high-dpi (#506)
1 parent 9193f38 commit aa6fcf1

File tree

13 files changed

+26
-1
lines changed

13 files changed

+26
-1
lines changed

examples/animation_curve/animation_curve.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ int main()
4949
const int screenWidth = 800;
5050
const int screenHeight = 540;
5151

52+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
53+
5254
InitWindow(screenWidth, screenHeight, "raygui - animation curves");
5355
SetTargetFPS(60);
5456

examples/controls_test_suite/controls_test_suite.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ int main()
6767
const int screenWidth = 960;
6868
const int screenHeight = 560;
6969

70+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
71+
7072
InitWindow(screenWidth, screenHeight, "raygui - controls test suite");
7173
SetExitKey(0);
7274

examples/controls_test_suite/gui_value_box_float.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ int main()
2828
const int screenWidth = 800;
2929
const int screenHeight = 450;
3030

31+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
32+
3133
InitWindow(screenWidth, screenHeight, "raygui - controls test suite");
3234

3335
float valueBoxValue = 0.0f;

examples/custom_file_dialog/custom_file_dialog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ int main()
3535
int screenWidth = 800;
3636
int screenHeight = 560;
3737

38+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
39+
3840
InitWindow(screenWidth, screenHeight, "raygui - custom modal dialog");
3941
SetExitKey(0);
4042

examples/custom_input_box/custom_input_box.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ int GuiFloatBox(Rectangle bounds, const char* text, float* value, int minValue,
2222

2323
int main()
2424
{
25+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
26+
2527
InitWindow(250, 100, "Basic calculator");
2628

2729
// General variables

examples/custom_sliders/custom_sliders.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ int main()
4545
int screenWidth = 800;
4646
int screenHeight = 450;
4747

48+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
49+
4850
InitWindow(screenWidth, screenHeight, "raygui - custom sliders");
4951

5052
float value = 0.5f;

examples/floating_window/floating_window.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ static void DrawContent(Vector2 position, Vector2 scroll) {
130130
}
131131

132132
int main(void) {
133+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
134+
133135
InitWindow(960, 560, "raygui - floating window example");
134136
SetTargetFPS(60);
135137
GuiLoadStyleDark();

examples/image_exporter/image_exporter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ int main(int argc, char *argv[])
3030
const int screenWidth = 800;
3131
const int screenHeight = 450;
3232

33+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
34+
3335
InitWindow(screenWidth, screenHeight, "raygui - image exporter");
3436

3537
// GUI controls initialization

examples/image_importer_raw/image_importer_raw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ int main()
3434
const int screenWidth = 800;
3535
const int screenHeight = 600;
3636

37+
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
38+
3739
InitWindow(screenWidth, screenHeight, "raygui - image raw importer");
3840

3941
Texture2D texture = { 0 };

examples/portable_window/portable_window.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ int main()
3030
const int screenWidth = 800;
3131
const int screenHeight = 600;
3232

33-
SetConfigFlags(FLAG_WINDOW_UNDECORATED);
33+
SetConfigFlags(FLAG_WINDOW_UNDECORATED || FLAG_WINDOW_HIGHDPI);
34+
3435
InitWindow(screenWidth, screenHeight, "raygui - portable window");
3536

3637
// General variables

0 commit comments

Comments
 (0)