333 |
|
|
334 |
if (g_host_be) |
if (g_host_be) |
335 |
{ |
{ |
336 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
337 |
|
|
338 |
value = make_colour16(split_colour15(pixel)); |
value = make_colour16(split_colour15(pixel)); |
339 |
|
|
362 |
|
|
363 |
if (g_host_be) |
if (g_host_be) |
364 |
{ |
{ |
365 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
366 |
|
|
367 |
value = make_colour24(split_colour15(pixel)); |
value = make_colour24(split_colour15(pixel)); |
368 |
if (g_xserver_be) |
if (g_xserver_be) |
455 |
|
|
456 |
if (g_host_be) |
if (g_host_be) |
457 |
{ |
{ |
458 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
459 |
|
|
460 |
value = make_colour24(split_colour16(pixel)); |
value = make_colour24(split_colour16(pixel)); |
461 |
|
|
486 |
|
|
487 |
if (g_host_be) |
if (g_host_be) |
488 |
{ |
{ |
489 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
490 |
|
|
491 |
value = make_colour32(split_colour16(pixel)); |
value = make_colour32(split_colour16(pixel)); |
492 |
|
|
496 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
497 |
*(out++) = value >> 8; |
*(out++) = value >> 8; |
498 |
*(out++) = value; |
*(out++) = value; |
499 |
} |
} |
500 |
else |
else |
501 |
{ |
{ |
502 |
*(out++) = value; |
*(out++) = value; |
503 |
*(out++) = value >> 8; |
*(out++) = value >> 8; |
504 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
505 |
*(out++) = value >> 24; |
*(out++) = value >> 24; |
506 |
} |
} |
507 |
} |
} |
508 |
} |
} |
509 |
|
|
510 |
static void |
static void |
719 |
g_host_be = !(BOOL) (*(uint8 *) (&test)); |
g_host_be = !(BOOL) (*(uint8 *) (&test)); |
720 |
g_xserver_be = (ImageByteOrder(g_display) == MSBFirst); |
g_xserver_be = (ImageByteOrder(g_display) == MSBFirst); |
721 |
|
|
722 |
if ((g_width == 0) || (g_height == 0)) |
/* |
723 |
|
* Determine desktop size |
724 |
|
*/ |
725 |
|
if (g_width < 0) |
726 |
|
{ |
727 |
|
/* Percent of screen */ |
728 |
|
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
729 |
|
g_width = WidthOfScreen(g_screen) * (-g_width) / 100; |
730 |
|
} |
731 |
|
else if (g_width == 0) |
732 |
{ |
{ |
733 |
/* Fetch geometry from _NET_WORKAREA */ |
/* Fetch geometry from _NET_WORKAREA */ |
734 |
uint32 x, y, cx, cy; |
uint32 x, y, cx, cy; |
745 |
g_height = 600; |
g_height = 600; |
746 |
} |
} |
747 |
} |
} |
748 |
|
else if (g_fullscreen) |
|
if (g_fullscreen) |
|
749 |
{ |
{ |
750 |
g_width = WidthOfScreen(g_screen); |
g_width = WidthOfScreen(g_screen); |
751 |
g_height = HeightOfScreen(g_screen); |
g_height = HeightOfScreen(g_screen); |
767 |
|
|
768 |
g_mod_map = XGetModifierMapping(g_display); |
g_mod_map = XGetModifierMapping(g_display); |
769 |
|
|
770 |
|
xkeymap_init(); |
771 |
|
|
772 |
if (g_enable_compose) |
if (g_enable_compose) |
773 |
g_IM = XOpenIM(g_display, NULL, NULL, NULL); |
g_IM = XOpenIM(g_display, NULL, NULL, NULL); |
774 |
|
|
|
xkeymap_init(); |
|
775 |
xclip_init(); |
xclip_init(); |
776 |
|
|
777 |
/* todo take this out when high colour is done */ |
/* todo take this out when high colour is done */ |
1207 |
{ |
{ |
1208 |
FD_SET(g_dsp_fd, &wfds); |
FD_SET(g_dsp_fd, &wfds); |
1209 |
n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n; |
n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n; |
1210 |
} |
} |
1211 |
#endif |
#endif |
1212 |
|
|
1213 |
switch (select(n, &rfds, &wfds, NULL, NULL)) |
switch (select(n, &rfds, &wfds, NULL, NULL)) |