mirror of
https://github.com/rricharz/Tek4010.git
synced 2026-01-11 23:53:16 +00:00
added -fast version for fast refresh on slower systems
This commit is contained in:
parent
abfc83b094
commit
8e7f391f6f
@ -140,10 +140,16 @@ static void do_drawing(cairo_t *cr, GtkWidget *widget)
|
||||
|
||||
cairo_set_source_surface(cr, permanent_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
if (argFast) {
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
}
|
||||
else {
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_LIGHTEN);
|
||||
cairo_set_source_surface(cr, temporary_surface, windowWidthOffset, windowHeightOffset);
|
||||
cairo_paint(cr);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
|
||||
}
|
||||
|
||||
cairo_destroy(permanent_cr);
|
||||
cairo_destroy(temporary_cr);
|
||||
|
||||
15
src/tube.c
15
src/tube.c
@ -83,6 +83,7 @@ int argAutoClear = 0;
|
||||
int argKeepSize = 0;
|
||||
int argHideCursor = 0;
|
||||
int argWait = 0;
|
||||
int argFast = 0;
|
||||
|
||||
int refresh_interval; // after this time in msec next refresh is done
|
||||
|
||||
@ -290,7 +291,7 @@ void tube_init(int argc, char* argv[])
|
||||
char *argv2[20];
|
||||
size_t bufsize = 127;
|
||||
int firstArg = 1;
|
||||
printf("tek4010 version 1.8\n");
|
||||
printf("tek4010 version 1.9\n");
|
||||
windowName = "Tektronix 4010/4014 emulator";
|
||||
if ((argc<2) || (argc>19)) {
|
||||
printf("Error:number of arguments\n");
|
||||
@ -348,6 +349,10 @@ void tube_init(int argc, char* argv[])
|
||||
argARDS = 1;
|
||||
windowName = "ARDS emulator";
|
||||
}
|
||||
else if (strcmp(argv[firstArg],"-fast") == 0) {
|
||||
printf("Fast refresh without fading\n");
|
||||
argFast = 1;
|
||||
}
|
||||
else if (strcmp(argv[firstArg],"-wait") == 0) {
|
||||
argWait = 3;
|
||||
if (firstArg < argc-2) {
|
||||
@ -586,11 +591,19 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
|
||||
void tube_clearSecond(cairo_t *cr2)
|
||||
// clear second surface
|
||||
{
|
||||
if (argFast) {
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, 0);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_paint(cr2);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_OVER);
|
||||
}
|
||||
else {
|
||||
cairo_set_source_rgba(cr2, 0, 0, 0, FADE);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_MULTIPLY);
|
||||
cairo_paint(cr2);
|
||||
cairo_set_operator(cr2, CAIRO_OPERATOR_OVER);
|
||||
isBrightSpot = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void tube_line_type(cairo_t *cr, cairo_t *cr2, enum LineType ln)
|
||||
|
||||
@ -21,6 +21,7 @@ extern int argAutoClear;
|
||||
extern int argKeepSize;
|
||||
extern int argHideCursor;
|
||||
extern int argWait;
|
||||
extern int argFast;
|
||||
|
||||
extern int hDotsPerChar;
|
||||
extern int vDotsPerChar;
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
Version 1.9 March 18, 2024
|
||||
==========================
|
||||
Added -fast option without fading for slower computers
|
||||
|
||||
Version 1.8 March 4, 2024
|
||||
=========================
|
||||
Improved bright spot with proper fading
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user