From 68434fba6f23a8ad4825727a993957d41bb1bfa1 Mon Sep 17 00:00:00 2001 From: DarioS Date: Tue, 17 May 2022 08:24:26 +0200 Subject: [PATCH] EgtGraphics 2.4e3 : - modifiche per prima gestione chiave di rete. --- DllMain.h | 1 + EGrDllMain.cpp | 15 +++++++++++++++ EgtGraphics.rc | Bin 11606 -> 11606 bytes ImageMgr.cpp | 6 ++++-- SceneBasic.cpp | 6 ++++-- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/DllMain.h b/DllMain.h index db8ec82..bad65e2 100644 --- a/DllMain.h +++ b/DllMain.h @@ -20,3 +20,4 @@ //----------------------------------------------------------------------------- ILogger* GetEGrLogger( void) ; const std::string& GetEGrKey( void) ; +bool GetEGrNetHwKey( void) ; diff --git a/EGrDllMain.cpp b/EGrDllMain.cpp index 0e8b1df..16db938 100644 --- a/EGrDllMain.cpp +++ b/EGrDllMain.cpp @@ -89,6 +89,7 @@ GetEGrLogger( void) //----------------------------------------------------------------------------- static std::string s_sKey ; +static bool s_bNetHwKey = false ; //----------------------------------------------------------------------------- void @@ -97,9 +98,23 @@ SetEGrKey( const std::string& sKey) s_sKey = sKey ; } +//----------------------------------------------------------------------------- +void +SetEGrNetHwKey( bool bNetHwKey) +{ + s_bNetHwKey = bNetHwKey ; +} + //----------------------------------------------------------------------------- const std::string& GetEGrKey( void) { return s_sKey ; } + +//----------------------------------------------------------------------------- +bool +GetEGrNetHwKey( void) +{ + return s_bNetHwKey ; +} diff --git a/EgtGraphics.rc b/EgtGraphics.rc index 072447ca84631bbdd97e9c5c82174e14bc10b0fa..e470297837e59f123c1784ca482dad9bed708b87 100644 GIT binary patch delta 92 zcmcZ>buDVcFE&Qw%?J7RGfm>rnOvZ#2IO6otYqBW#%;w6meB=K7bUA1H)jc3pa^Yd L!LC(6*^LVT?Lr=a delta 92 zcmcZ>buDVcFE&QQ%?J7RGfm>rnOvZ#2IO6otYqBW#%;w6meB=K7bUA1H)jc3pa^Yd L!LC(6*^LVT>Rujj diff --git a/ImageMgr.cpp b/ImageMgr.cpp index eee8785..b603071 100644 --- a/ImageMgr.cpp +++ b/ImageMgr.cpp @@ -29,8 +29,10 @@ IEgrImageMgr* CreateEgrImageMgr( void) { // verifico la chiave e le opzioni - if ( ! TestKeyForEGr( GetEGrKey(), 0, GetEGrLogger())) - return nullptr ; + if ( ! GetEGrNetHwKey()) { + if ( ! TestKeyForEGr( GetEGrKey(), 0, GetEGrLogger())) + return nullptr ; + } // creo l'oggetto return static_cast ( new(nothrow) ImageMgr) ; } diff --git a/SceneBasic.cpp b/SceneBasic.cpp index 1da3aa5..9aa2634 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -38,8 +38,10 @@ IEGrScene* CreateEGrScene( void) { // verifico la chiave e le opzioni - if ( ! TestKeyForEGr( GetEGrKey(), 0, GetEGrLogger())) - return nullptr ; + if ( ! GetEGrNetHwKey()) { + if ( ! TestKeyForEGr( GetEGrKey(), 0, GetEGrLogger())) + return nullptr ; + } // creo l'oggetto return static_cast ( new(nothrow) Scene) ; }