From: ehofman Date: Wed, 6 Oct 2004 09:57:31 +0000 (+0000) Subject: Reverse the declaration order. jpgRenderFrame (formerly known as trRenderFrame) is... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62aa32a4178659d224340997dd065cc3b49bbf11;p=simgear.git 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). --- 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: