1 |
|
/* |
2 |
|
* video_x.cpp - Video/graphics emulation, X11 specific stuff |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2002 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
97 |
|
|
98 |
|
static bool redraw_thread_active = false; // Flag: Redraw thread installed |
99 |
|
#ifdef HAVE_PTHREADS |
100 |
+ |
static pthread_attr_t redraw_thread_attr; // Redraw thread attributes |
101 |
|
static volatile bool redraw_thread_cancel; // Flag: Cancel Redraw thread |
102 |
|
static pthread_t redraw_thread; // Redraw thread |
103 |
|
#endif |
1000 |
|
if ((line[0] == '#') || (line[0] == ';') || (line[0] == '\0')) |
1001 |
|
continue; |
1002 |
|
|
1003 |
< |
if ((sscanf(line, "%19s %d %x", &fb_name, &fb_depth, &fb_offset) == 3) |
1003 |
> |
if ((sscanf(line, "%19s %d %x", fb_name, &fb_depth, &fb_offset) == 3) |
1004 |
|
&& (strcmp(fb_name, fb_name) == 0) && (fb_depth == max_depth)) { |
1005 |
|
device_found = true; |
1006 |
|
break; |
1449 |
|
// Start redraw/input thread |
1450 |
|
#ifdef HAVE_PTHREADS |
1451 |
|
redraw_thread_cancel = false; |
1452 |
< |
redraw_thread_active = (pthread_create(&redraw_thread, NULL, redraw_func, NULL) == 0); |
1452 |
> |
Set_pthread_attr(&redraw_thread_attr, 0); |
1453 |
> |
redraw_thread_active = (pthread_create(&redraw_thread, &redraw_thread_attr, redraw_func, NULL) == 0); |
1454 |
|
if (!redraw_thread_active) { |
1455 |
|
printf("FATAL: cannot create redraw thread\n"); |
1456 |
|
return false; |