Fix crash on Ctrl-V in PUI
This commit is contained in:
parent
49c3fc064a
commit
196aa472fb
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,8 @@ using namespace flightgear;
|
|||
|
||||
puFont guiFnt = 0;
|
||||
|
||||
// this is declared in puLocal.h, re-declare here so we can call it ourselves
|
||||
void puSetPasteBuffer ( const char *ch ) ;
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
init the gui
|
||||
|
@ -80,6 +82,10 @@ public:
|
|||
puSetDefaultStyle ( PUSTYLE_SMALL_SHADED ); //PUSTYLE_DEFAULT
|
||||
puSetDefaultColourScheme (0.8, 0.8, 0.9, 1);
|
||||
|
||||
// ensure we set a non-NULL paste buffer so Ctrl-V doesn't crash us,
|
||||
// with older versions of PLIB (pre 1.8.6)
|
||||
puSetPasteBuffer(" ");
|
||||
|
||||
// OSG Texture2D sets this, which breaks PLIB fntLoadTXF
|
||||
// force it back to zero so width passed to glTexImage2D is used
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue