Changeset 44:f5222044879c in xplra for src/plugin/src/xplra/plugin.cc
- Timestamp:
- 02/15/13 18:51:58 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/plugin/src/xplra/plugin.cc
r43 r44 31 31 #include "ListenThread.h" 32 32 33 #include "MessageWindow.h" 34 #include "Menu.h" 33 #include "Globals.h" 35 34 36 35 #include <hu/varadiistvan/xplcommon/Util.h> … … 38 37 39 38 #include <XPLMDefs.h> 40 #include <XPLMUtilities.h>41 39 #include <XPLMProcessing.h> 42 40 #include <XPLMMenus.h> … … 53 51 54 52 using xplra::ListenThread; 55 using xplra::MessageWindow; 56 using xplra::Menu; 53 using xplra::Globals; 57 54 58 55 using hu::varadiistvan::xplcommon::Util; … … 61 58 62 59 /** 63 * The window to display messages from the clients.60 * The global objects. 64 61 */ 65 static MessageWindow* messageWindow = 0; 66 67 /** 68 * The menu. 69 */ 70 static Menu* menu = 0; 62 static Globals* globals = 0; 71 63 72 64 /** … … 100 92 // XPLMRegisterFlightLoopCallback(&callback, 5.0, 0); 101 93 102 int xplaneVersion = 0; 103 int xplmVersion = 0; 104 XPLMHostApplicationID hostID = 0; 105 XPLMGetVersions(&xplaneVersion, &xplmVersion, &hostID); 94 globals = new Globals(); 106 95 107 messageWindow = new MessageWindow(); 108 menu = new Menu(*messageWindow); 109 110 listenThread = new ListenThread(xplaneVersion, xplmVersion, 111 *messageWindow); 96 listenThread = new ListenThread(*globals); 112 97 listenThread->start(); 113 98 } … … 134 119 } 135 120 136 delete menu; menu = 0; 137 delete messageWindow; messageWindow = 0; 121 delete globals; globals = 0; 138 122 } 139 123
Note:
See TracChangeset
for help on using the changeset viewer.