mirror of
https://github.com/rricharz/Tek4010.git
synced 2026-02-26 08:53:35 +00:00
Version 3.0.1. GIN mode in full screen returns properly scaled coodinates
This commit is contained in:
16
main.c
16
main.c
@@ -53,6 +53,8 @@ static GtkWidget *window;
|
||||
int windowWidth;
|
||||
int windowHeight;
|
||||
static double aspectRatio;
|
||||
static int windowHeightOffset = 0;
|
||||
static int windowWidthOffset = 0;
|
||||
|
||||
guint global_timeout_ref;
|
||||
|
||||
@@ -76,7 +78,7 @@ static gboolean on_timer_event(GtkWidget *widget)
|
||||
|
||||
static gboolean clicked(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||
{
|
||||
if (tube_clicked(event->button, event->x, event->y))
|
||||
if (tube_clicked(event->button, event->x - windowWidthOffset, event->y - windowHeightOffset))
|
||||
gtk_widget_queue_draw(widget);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -91,8 +93,6 @@ static void on_quit_event()
|
||||
static void do_drawing(cairo_t *cr, GtkWidget *widget)
|
||||
{
|
||||
static cairo_surface_t *permanent_surface, *temporary_surface;
|
||||
static int windowHeightOffset = 0;
|
||||
static int windowWidthOffset = 0;
|
||||
|
||||
g_source_remove(global_timeout_ref); // stop timer, in case do_drawing takes too long
|
||||
|
||||
@@ -117,11 +117,11 @@ static void do_drawing(cairo_t *cr, GtkWidget *widget)
|
||||
temporary_surface = cairo_surface_create_similar(cairo_get_target(cr),
|
||||
CAIRO_CONTENT_COLOR_ALPHA, windowWidth, windowHeight);
|
||||
|
||||
if (argFull) { // hide cursor in full mode
|
||||
GdkCursor* Cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
|
||||
GdkWindow* win = gtk_widget_get_window(window);
|
||||
gdk_window_set_cursor((win), Cursor);
|
||||
}
|
||||
//if (argFull) { // hide cursor in full mode
|
||||
// GdkCursor* Cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
|
||||
// GdkWindow* win = gtk_widget_get_window(window);
|
||||
// gdk_window_set_cursor((win), Cursor);
|
||||
//}
|
||||
}
|
||||
|
||||
cairo_t *permanent_cr = cairo_create(permanent_surface);
|
||||
|
||||
11
tek4010.c
11
tek4010.c
@@ -117,10 +117,13 @@ void tek4010_bell()
|
||||
void sendCoordinates()
|
||||
{
|
||||
// send 4 coordinate bytes
|
||||
putc((tube_x0 >> 5) + 0xa0,putKeys);
|
||||
putc((tube_x0 & 31) + 0xa0,putKeys);
|
||||
putc((tube_y0 >> 5) + 0xa0,putKeys);
|
||||
putc((tube_y0 & 31) + 0xa0,putKeys);
|
||||
int x,y;
|
||||
x = (int)((double)tube_x0 / efactor);
|
||||
y = (int)((double)tube_y0 / efactor);
|
||||
putc((x >> 5) + 0xa0,putKeys);
|
||||
putc((x & 31) + 0xa0,putKeys);
|
||||
putc((y >> 5) + 0xa0,putKeys);
|
||||
putc((y & 31) + 0xa0,putKeys);
|
||||
}
|
||||
|
||||
void enqMode()
|
||||
|
||||
2
tube.c
2
tube.c
@@ -180,7 +180,7 @@ void tube_init(int argc, char* argv[])
|
||||
char *argv2[20];
|
||||
size_t bufsize = 127;
|
||||
int firstArg = 1;
|
||||
printf("tek4010 version 1.3\n");
|
||||
printf("tek4010 version 1.3.1\n");
|
||||
windowName = "Tektronix 4010/4014 emulator";
|
||||
if ((argc<2) || (argc>19)) {
|
||||
printf("Error:number of arguments\n");
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
Version 1.3.1 May 4, 2019
|
||||
=========================
|
||||
Bug fixes
|
||||
- GIN mode returns properly scaled coordinates in full mode
|
||||
- Cursor not disabled in full mode, needed for GIN mode
|
||||
|
||||
Version 1.3 April 29, 2019
|
||||
============================
|
||||
==========================
|
||||
Bug fixes
|
||||
- Vertical positioning in ARDS mode
|
||||
- Character size change did not leave escape mode
|
||||
|
||||
Reference in New Issue
Block a user