diff --git a/src/main.c b/src/main.c index 331bf89..e66d205 100644 --- a/src/main.c +++ b/src/main.c @@ -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); - 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); + 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); diff --git a/src/tube.c b/src/tube.c index c4b2604..334225c 100755 --- a/src/tube.c +++ b/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 { - 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; + 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) diff --git a/src/tube.h b/src/tube.h index 6f83fa8..e039e50 100755 --- a/src/tube.h +++ b/src/tube.h @@ -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; diff --git a/versions.txt b/versions.txt index 1fbdde7..2674123 100644 --- a/versions.txt +++ b/versions.txt @@ -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