mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
fix to build with CURSES_ONLY flag
This commit is contained in:
parent
432b738257
commit
92029b2443
7 changed files with 18 additions and 1 deletions
1
xwords4/linux/.gitignore
vendored
1
xwords4/linux/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
/core.*
|
/core.*
|
||||||
obj_linux_memdbg
|
obj_linux_memdbg
|
||||||
|
obj_linux_memdbg_curses
|
||||||
*.xwg
|
*.xwg
|
||||||
obj_linux_rel
|
obj_linux_rel
|
||||||
log_*_*.txt
|
log_*_*.txt
|
||||||
|
|
|
@ -246,6 +246,9 @@ ifneq (,$(findstring DPLATFORM_GTK,$(DEFINES)))
|
||||||
POINTER_SUPPORT = -DPOINTER_SUPPORT
|
POINTER_SUPPORT = -DPOINTER_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += `pkg-config --cflags glib-2.0`
|
||||||
|
LIBS += `pkg-config --libs glib-2.0`
|
||||||
|
|
||||||
CFLAGS += $(POINTER_SUPPORT)
|
CFLAGS += $(POINTER_SUPPORT)
|
||||||
|
|
||||||
ifneq (,$(findstring DPLATFORM_NCURSES,$(DEFINES)))
|
ifneq (,$(findstring DPLATFORM_NCURSES,$(DEFINES)))
|
||||||
|
|
|
@ -170,6 +170,7 @@ writeToDB( XWStreamCtxt* stream, void* closure )
|
||||||
(*cGlobals->onSave)( cGlobals->onSaveClosure, selRow, newGame );
|
(*cGlobals->onSave)( cGlobals->onSaveClosure, selRow, newGame );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PLATFORM_GTK
|
||||||
static void
|
static void
|
||||||
addSnapshot( CommonGlobals* cGlobals )
|
addSnapshot( CommonGlobals* cGlobals )
|
||||||
{
|
{
|
||||||
|
@ -191,6 +192,9 @@ addSnapshot( CommonGlobals* cGlobals )
|
||||||
|
|
||||||
LOG_RETURN_VOID();
|
LOG_RETURN_VOID();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
# define addSnapshot( cGlobals )
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
summarize( CommonGlobals* cGlobals )
|
summarize( CommonGlobals* cGlobals )
|
||||||
|
@ -330,6 +334,7 @@ getGameInfo( sqlite3* pDb, sqlite3_int64 rowid, GameInfo* gib )
|
||||||
gib->lastMoveTime = sqlite3_column_int( ppStmt, 10 );
|
gib->lastMoveTime = sqlite3_column_int( ppStmt, 10 );
|
||||||
snprintf( gib->name, sizeof(gib->name), "Game %lld", rowid );
|
snprintf( gib->name, sizeof(gib->name), "Game %lld", rowid );
|
||||||
|
|
||||||
|
#ifdef PLATFORM_GTK
|
||||||
/* Load the snapshot */
|
/* Load the snapshot */
|
||||||
GdkPixbuf* snap = NULL;
|
GdkPixbuf* snap = NULL;
|
||||||
const XP_U8* ptr = sqlite3_column_blob( ppStmt, 11 );
|
const XP_U8* ptr = sqlite3_column_blob( ppStmt, 11 );
|
||||||
|
@ -342,6 +347,7 @@ getGameInfo( sqlite3* pDb, sqlite3_int64 rowid, GameInfo* gib )
|
||||||
g_object_unref( istr );
|
g_object_unref( istr );
|
||||||
}
|
}
|
||||||
gib->snap = snap;
|
gib->snap = snap;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
sqlite3_finalize( ppStmt );
|
sqlite3_finalize( ppStmt );
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ typedef struct _GameInfo {
|
||||||
XP_UCHAR name[128];
|
XP_UCHAR name[128];
|
||||||
XP_UCHAR room[128];
|
XP_UCHAR room[128];
|
||||||
XP_UCHAR conn[128];
|
XP_UCHAR conn[128];
|
||||||
|
#ifdef PLATFORM_GTK
|
||||||
GdkPixbuf* snap;
|
GdkPixbuf* snap;
|
||||||
|
#endif
|
||||||
XP_U32 gameID;
|
XP_U32 gameID;
|
||||||
XP_S16 nMoves;
|
XP_S16 nMoves;
|
||||||
XP_Bool gameOver;
|
XP_Bool gameOver;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PLATFORM_GTK
|
||||||
|
|
||||||
#ifndef _GTKDRAW_H_
|
#ifndef _GTKDRAW_H_
|
||||||
#define _GTKDRAW_H_
|
#define _GTKDRAW_H_
|
||||||
|
|
||||||
|
@ -31,3 +33,4 @@ void removeSurface( GtkDrawCtx* dctx );
|
||||||
void getImage( GtkDrawCtx* dctx, XWStreamCtxt* stream );
|
void getImage( GtkDrawCtx* dctx, XWStreamCtxt* stream );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -240,6 +240,7 @@ typedef struct _SourceData {
|
||||||
void* procClosure;
|
void* procClosure;
|
||||||
} SourceData;
|
} SourceData;
|
||||||
|
|
||||||
|
#ifdef PLATFORM_GTK
|
||||||
typedef struct _GtkAppGlobals {
|
typedef struct _GtkAppGlobals {
|
||||||
GArray* selRows;
|
GArray* selRows;
|
||||||
LaunchParams* params;
|
LaunchParams* params;
|
||||||
|
@ -253,5 +254,6 @@ typedef struct _GtkAppGlobals {
|
||||||
/* save window position */
|
/* save window position */
|
||||||
GdkEventConfigure lastConfigure;
|
GdkEventConfigure lastConfigure;
|
||||||
} GtkAppGlobals;
|
} GtkAppGlobals;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
#ifdef PLATFORM_GTK
|
#ifdef PLATFORM_GTK
|
||||||
# include <glib.h>
|
|
||||||
# include <gdk/gdk.h>
|
# include <gdk/gdk.h>
|
||||||
# include <gtk/gtk.h>
|
# include <gtk/gtk.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue