/[svn]/gigedit/trunk/src/gigedit/gigedit.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/gigedit.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1853 by schoenebeck, Sun Mar 1 22:26:36 2009 UTC revision 1898 by persson, Sun May 10 09:35:56 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (C) 2007, 2008 Andreas Persson   * Copyright (C) 2007-2009 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 79  private: Line 79  private:
79      void close_window();      void close_window();
80  };  };
81    
82    #ifdef WIN32
83    HINSTANCE gigedit_dll_handle = 0;
84    #endif
85    
86  void init_app() {  void init_app() {
87      static bool process_initialized = false;      static bool process_initialized = false;
88      if (!process_initialized) {      if (!process_initialized) {
# Line 91  void init_app() { Line 95  void init_app() {
95  #ifdef WIN32  #ifdef WIN32
96  #if GLIB_CHECK_VERSION(2, 16, 0)  #if GLIB_CHECK_VERSION(2, 16, 0)
97          gchar* root =          gchar* root =
98              g_win32_get_package_installation_directory_of_module(NULL);              g_win32_get_package_installation_directory_of_module(gigedit_dll_handle);
99  #else  #else
100          gchar* root =          gchar* root =
101              g_win32_get_package_installation_directory(NULL, NULL);              g_win32_get_package_installation_directory(NULL, NULL);
# Line 304  void GigEditState::run(gig::Instrument* Line 308  void GigEditState::run(gig::Instrument*
308      mutex.unlock();      mutex.unlock();
309      close.wait(); // sleep until window is closed      close.wait(); // sleep until window is closed
310  }  }
311    
312    #if defined(WIN32)
313    extern "C" {
314        BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
315        {
316            switch (reason) {
317            case DLL_PROCESS_ATTACH:
318                gigedit_dll_handle = instance;
319                break;
320            }
321            return TRUE;
322        }
323    }
324    #endif

Legend:
Removed from v.1853  
changed lines
  Added in v.1898

  ViewVC Help
Powered by ViewVC