From 62aa32a4178659d224340997dd065cc3b49bbf11 Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 6 Oct 2004 09:57:31 +0000 Subject: [PATCH] Reverse the declaration order. jpgRenderFrame (formerly known as trRenderFrame) is now declared as a NULL function pointer and assignment of the proper function is now done in FlightGear (jpgRenderFrame=FGRenderer::update). --- simgear/screen/jpgfactory.cxx | 7 +++---- simgear/screen/jpgfactory.hxx | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/simgear/screen/jpgfactory.cxx b/simgear/screen/jpgfactory.cxx index b21d5ade..aef48ae2 100644 --- a/simgear/screen/jpgfactory.cxx +++ b/simgear/screen/jpgfactory.cxx @@ -57,8 +57,7 @@ typedef struct { typedef my_destination_mgr * my_dest_ptr; -/* Where should this go ?? */ -extern void trRenderFrame( void ); +void (*jpgRenderFrame)(void) = NULL; trJpgFactory::trJpgFactory() { imageWidth = imageHeight = 0; @@ -233,7 +232,7 @@ int trJpgFactory::compress() int trJpgFactory::render() { - if( !tr ) { + if( !tr || !jpgRenderFrame ) { printf("!! NO tr !!\n trJpgFactory::render()\n"); return 0; } @@ -253,7 +252,7 @@ int trJpgFactory::render() // printf("\ttrBeginTile(tr)\n"); trBeginTile(tr); - trRenderFrame(); + jpgRenderFrame(); trEndTile(tr); /* just to be safe */ diff --git a/simgear/screen/jpgfactory.hxx b/simgear/screen/jpgfactory.hxx index 97a78c7e..2c9c4e9c 100644 --- a/simgear/screen/jpgfactory.hxx +++ b/simgear/screen/jpgfactory.hxx @@ -36,6 +36,9 @@ extern "C" { #include + +extern void (*jpgRenderFrame)(void); + /* should look at how VNC does this */ class trJpgFactory { private: -- 2.39.5