Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
9ce9bb70
Commit
9ce9bb70
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Update to use batched flush
parent
c2fd3f02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/conio/x_cio.c
+9
-0
9 additions, 0 deletions
src/conio/x_cio.c
src/conio/x_cio.h
+1
-0
1 addition, 0 deletions
src/conio/x_cio.h
src/conio/x_events.c
+4
-3
4 additions, 3 deletions
src/conio/x_events.c
src/conio/x_events.h
+1
-0
1 addition, 0 deletions
src/conio/x_events.h
with
15 additions
and
3 deletions
src/conio/x_cio.c
+
9
−
0
View file @
9ce9bb70
...
...
@@ -432,3 +432,12 @@ void x11_drawrect(int xoffset,int yoffset,int width,int height,unsigned char *da
while
(
write
(
local_pipe
[
1
],
&
ev
,
sizeof
(
ev
))
==-
1
);
}
}
void
x11_flush
(
void
)
{
struct
x11_local_event
ev
;
ev
.
type
=
X11_LOCAL_FLUSH
;
if
(
x11_initialized
)
while
(
write
(
local_pipe
[
1
],
&
ev
,
sizeof
(
ev
))
==-
1
);
}
This diff is collapsed.
Click to expand it.
src/conio/x_cio.h
+
1
−
0
View file @
9ce9bb70
...
...
@@ -70,6 +70,7 @@ int x_getfont(void);
int
x_loadfont
(
char
*
filename
);
int
x_get_window_info
(
int
*
width
,
int
*
height
,
int
*
xpos
,
int
*
ypos
);
void
x11_drawrect
(
int
xoffset
,
int
yoffset
,
int
width
,
int
height
,
unsigned
char
*
data
);
void
x11_flush
(
void
);
#ifdef __cplusplus
}
#endif
...
...
This diff is collapsed.
Click to expand it.
src/conio/x_events.c
+
4
−
3
View file @
9ce9bb70
...
...
@@ -229,7 +229,6 @@ static int init_window()
x11
.
XSelectInput
(
dpy
,
win
,
KeyReleaseMask
|
KeyPressMask
|
ExposureMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
|
StructureNotifyMask
);
// x11.XFlush(dpy);
x11
.
XGetWindowAttributes
(
dpy
,
win
,
&
attr
);
memcpy
(
&
visual
,
attr
.
visual
,
sizeof
(
visual
));
...
...
@@ -302,7 +301,7 @@ static int video_init()
return
(
-
1
);
vstat
.
scaling
=
1
;
bitmap_init
(
x11_drawrect
);
bitmap_init
(
x11_drawrect
,
x11_flush
);
/* Initialize mode 3 (text, 80x25, 16 colors) */
if
(
init_mode
(
3
))
{
...
...
@@ -381,7 +380,6 @@ static void local_draw_rect(struct update_rect *rect)
}
#endif
#endif
x11
.
XFlush
(
dpy
);
free
(
rect
->
data
);
}
...
...
@@ -866,6 +864,9 @@ void x11_event_thread(void *args)
case
X11_LOCAL_DRAWRECT
:
local_draw_rect
(
&
lev
.
data
.
rect
);
break
;
case
X11_LOCAL_FLUSH
:
x11
.
XFlush
(
dpy
);
break
;
case
X11_LOCAL_BEEP
:
x11
.
XBell
(
dpy
,
100
);
break
;
...
...
This diff is collapsed.
Click to expand it.
src/conio/x_events.h
+
1
−
0
View file @
9ce9bb70
...
...
@@ -21,6 +21,7 @@ enum x11_local_events {
,
X11_LOCAL_COPY
,
X11_LOCAL_PASTE
,
X11_LOCAL_DRAWRECT
,
X11_LOCAL_FLUSH
,
X11_LOCAL_BEEP
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment