Changeset 788c76e3 in mainline
- Timestamp:
- 2023-10-10T19:14:38Z (13 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d9403d5
- Parents:
- c0efb2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/gfxdemo/gfxdemo.c
rc0efb2e r788c76e3 1109 1109 gfx_rect_t wrect; 1110 1110 gfx_coord2_t off; 1111 gfx_rect_t ui_rect; 1112 gfx_coord2_t dims; 1111 1113 errno_t rc; 1112 1114 … … 1114 1116 if (rc != EOK) { 1115 1117 printf("Error initializing UI (%s)\n", display_spec); 1118 goto error; 1119 } 1120 1121 rc = ui_get_rect(ui, &ui_rect); 1122 if (rc != EOK) { 1123 printf("Error getting display size.\n"); 1116 1124 goto error; 1117 1125 } … … 1133 1141 gfx_rect_rtranslate(&off, &wrect, ¶ms.rect); 1134 1142 1143 gfx_rect_dims(&ui_rect, &dims); 1144 1145 /* Make sure window is not larger than the entire screen */ 1146 if (params.rect.p1.x > dims.x) 1147 params.rect.p1.x = dims.x; 1148 if (params.rect.p1.y > dims.y) 1149 params.rect.p1.y = dims.y; 1150 1135 1151 rc = ui_window_create(ui, ¶ms, &window); 1136 1152 if (rc != EOK) { … … 1147 1163 } 1148 1164 1149 task_retval(0); 1150 1151 rc = demo_loop(gc, rect.p1.x, rect.p1.y); 1165 ui_window_get_app_rect(window, &rect); 1166 gfx_rect_dims(&rect, &dims); 1167 1168 if (!ui_is_fullscreen(ui)) 1169 task_retval(0); 1170 1171 rc = demo_loop(gc, dims.x, dims.y); 1152 1172 if (rc != EOK) 1153 1173 goto error;
Note:
See TracChangeset
for help on using the changeset viewer.