Changes in uspace/srv/hid/console/gcons.c [ecd2775:306061a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/gcons.c
recd2775 r306061a 34 34 35 35 #include <ipc/fb.h> 36 #include <ipc/ipc.h>37 36 #include <async.h> 38 37 #include <stdio.h> … … 82 81 83 82 static bool use_gcons = false; 84 static ipcarg_t xres;85 static ipcarg_t yres;83 static sysarg_t xres; 84 static sysarg_t yres; 86 85 87 86 enum butstate { … … 107 106 static size_t active_console = 0; 108 107 109 static ipcarg_t mouse_x = 0;110 static ipcarg_t mouse_y= 0;108 static sysarg_t mouse_x = 0; 109 static sysarg_t mouse_y= 0; 111 110 112 111 static bool btn_pressed = false; 113 static ipcarg_t btn_x = 0;114 static ipcarg_t btn_y = 0;112 static sysarg_t btn_x = 0; 113 static sysarg_t btn_y = 0; 115 114 116 115 static void vp_switch(int vp) … … 120 119 121 120 /** Create view port */ 122 static int vp_create( ipcarg_t x, ipcarg_t y, ipcarg_t width, ipcarg_t height)121 static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height) 123 122 { 124 123 return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y, … … 137 136 138 137 /** Transparent putchar */ 139 static void tran_putch(wchar_t ch, ipcarg_t col, ipcarg_t row)138 static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row) 140 139 { 141 140 async_msg_3(fbphone, FB_PUTCHAR, ch, col, row); … … 157 156 158 157 char data[5]; 159 snprintf(data, 5, "% u", index + 1);158 snprintf(data, 5, "%zu", index + 1); 160 159 161 160 size_t i; … … 286 285 ssize_t nx = (ssize_t) mouse_x + dx; 287 286 ssize_t ny = (ssize_t) mouse_y + dy; 288 289 if (!use_gcons) 287 288 /* Until gcons is initalized we don't have the screen resolution */ 289 if (xres == 0 || yres == 0) 290 290 return; 291 291 … … 297 297 } 298 298 299 static int gcons_find_conbut( ipcarg_t x, ipcarg_t y)300 { 301 ipcarg_t status_start = STATUS_START + (xres - 800) / 2;299 static int gcons_find_conbut(sysarg_t x, sysarg_t y) 300 { 301 sysarg_t status_start = STATUS_START + (xres - 800) / 2; 302 302 303 303 if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT)) … … 313 313 return -1; 314 314 315 ipcarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);315 sysarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE); 316 316 317 317 if (btn < CONSOLE_COUNT) … … 363 363 * 364 364 */ 365 static void draw_pixmap(char *logo, size_t size, ipcarg_t x, ipcarg_t y)365 static void draw_pixmap(char *logo, size_t size, sysarg_t x, sysarg_t y) 366 366 { 367 367 /* Create area */ … … 374 374 375 375 /* Send area */ 376 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, ( ipcarg_t) shm);376 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 377 377 if (rc) 378 378 goto exit; … … 436 436 437 437 /* Send area */ 438 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, ( ipcarg_t) shm);438 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 439 439 if (rc) 440 440 goto exit; … … 513 513 514 514 /* Create status buttons */ 515 ipcarg_t status_start = STATUS_START + (xres - 800) / 2;515 sysarg_t status_start = STATUS_START + (xres - 800) / 2; 516 516 size_t i; 517 517 for (i = 0; i < CONSOLE_COUNT; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.