diff --git a/xwords4/linux/gamesdb.c b/xwords4/linux/gamesdb.c index be1780984..a50b35f03 100644 --- a/xwords4/linux/gamesdb.c +++ b/xwords4/linux/gamesdb.c @@ -24,8 +24,8 @@ #include "linuxutl.h" #include "main.h" -#define SNAP_WIDTH 200 -#define SNAP_HEIGHT 200 +#define SNAP_WIDTH 150 +#define SNAP_HEIGHT 150 static void getColumnText( sqlite3_stmt *ppStmt, int iCol, XP_UCHAR* buf, int len ); @@ -322,21 +322,16 @@ getGameInfo( sqlite3* pDb, sqlite3_int64 rowid, GameInfo* gib ) snprintf( gib->name, sizeof(gib->name), "Game %lld", rowid ); /* Load the snapshot */ + GdkPixbuf* snap = NULL; const XP_U8* ptr = sqlite3_column_blob( ppStmt, 10 ); - int size = sqlite3_column_bytes( ppStmt, 10 ); - /* Skip the version that's written in */ - ptr += sizeof(XP_U16); size -= sizeof(XP_U16); - GInputStream* istr = g_memory_input_stream_new_from_data( ptr, size, NULL ); - GError *error = NULL; - GdkPixbuf* snap = gdk_pixbuf_new_from_stream( istr, NULL, &error ); - g_object_unref( istr ); - - if ( !snap ) { - XP_LOGF( "%s(): error from gdk_pixbuf_new_from_stream(): %s", - __func__, error->message ); - g_error_free( error ); + if ( !!ptr ) { + int size = sqlite3_column_bytes( ppStmt, 10 ); + /* Skip the version that's written in */ + ptr += sizeof(XP_U16); size -= sizeof(XP_U16); + GInputStream* istr = g_memory_input_stream_new_from_data( ptr, size, NULL ); + snap = gdk_pixbuf_new_from_stream( istr, NULL, NULL ); + g_object_unref( istr ); } - XP_ASSERT( !!snap ); gib->snap = snap; } sqlite3_finalize( ppStmt ); diff --git a/xwords4/linux/gtkdraw.c b/xwords4/linux/gtkdraw.c index 90eb8c304..e32c7c293 100644 --- a/xwords4/linux/gtkdraw.c +++ b/xwords4/linux/gtkdraw.c @@ -93,8 +93,11 @@ initCairo( GtkDrawCtx* dctx ) XP_Bool inited = !!cairo; if ( inited ) { dctx->_cairo = cairo; - /* XP_LOGF( "dctx->cairo=%p", dctx->_cairo ); */ - cairo_set_line_width( cairo, 1.0 ); + if ( !!dctx->surface ) { + cairo_set_line_width( cairo, 0.1 ); + } else { + cairo_set_line_width( cairo, 1.0 ); + } cairo_set_line_cap( cairo, CAIRO_LINE_CAP_SQUARE ); } return inited; diff --git a/xwords4/linux/red.png b/xwords4/linux/red.png deleted file mode 100644 index 6b36c60af..000000000 Binary files a/xwords4/linux/red.png and /dev/null differ