Skip to content

Commit

Permalink
Cleanup NSM_SUPPORT defines.
Browse files Browse the repository at this point in the history
  • Loading branch information
stazed authored and stazed committed Apr 14, 2021
1 parent bbaf775 commit 6268bb8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/UI/rkrprocess_gui.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3829,6 +3829,7 @@ void RKRGUI::Save_Midi_Program_Change_Table()

int RKRGUI::NSM_gui_show(int hold_preset)
{
#ifdef NSM_SUPPORT
// To update the Gui for any MIDI changes
Put_Loaded();
Put_Loaded_Bank();
Expand All @@ -3851,12 +3852,14 @@ int RKRGUI::NSM_gui_show(int hold_preset)
// result in an out of range.. segfault. Since this is used
// for efx_order[] array location.
m_process->OnOffC = 0;

#endif

return hold_preset;
}

void RKRGUI::NSM_gui_hide()
{
#ifdef NSM_SUPPORT
m_process->Gui_Shown = 0;
is_bank_modified();
is_PG_table_modified();
Expand All @@ -3870,4 +3873,5 @@ void RKRGUI::NSM_gui_hide()
Principal->hide();
Fl::flush();
global_gui_show = CONST_GUI_OFF;
#endif
}
4 changes: 2 additions & 2 deletions src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ extern int global_font_type;
extern int global_font_size;
extern int global_look_changed;

// NSM
#ifdef NSM_SUPPORT
extern int global_gui_show;
const int CONST_GUI_SHOW = 1;
const int CONST_GUI_HIDE = 2;
const int CONST_GUI_OFF = 0;
// End NSM
#endif

extern std::string nsm_preferences_file;

Expand Down
2 changes: 1 addition & 1 deletion src/main.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ std::string nsm_preferences_file = "";
static volatile int got_sigint = 0;
static volatile int got_sigusr1 = 0;
int save_preferences = 0;
int global_gui_show = 0;

#ifdef NSM_SUPPORT
#include "nsm.h"

int global_gui_show = 0;
static nsm_client_t *nsm = 0;
static int wait_nsm = 1;

Expand Down

0 comments on commit 6268bb8

Please sign in to comment.