13
0

Allow to use UI scaling to libardour

This will replace LV2Plugin::_ui_scale_factor,
and be useful for export-analysis.
This commit is contained in:
Robin Gareus 2021-12-24 21:54:27 +01:00
parent 31159c2f77
commit 50c60c031d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,7 @@ namespace ARDOUR {
extern LIBARDOUR_API PBD::Signal0<void> GUIIdle;
extern LIBARDOUR_API PBD::Signal3<bool,std::string,std::string,int> CopyConfigurationFiles;
extern LIBARDOUR_API std::map<std::string, bool> reserved_io_names;
extern LIBARDOUR_API float ui_scale_factor;
/**
* @param try_optimization true to enable hardware optimized routines
@ -85,6 +86,8 @@ namespace ARDOUR {
LIBARDOUR_API void setup_fpu ();
LIBARDOUR_API std::vector<SyncSource> get_available_sync_options();
LIBARDOUR_API void set_global_ui_scale_factor (float s);
/* the @param ui_handler will be called if there are old configuration
* files to be copied. It should (probably) ask the user about the
* action, and return true or false depending on whether or not the

View File

@ -162,10 +162,13 @@ PBD::Signal3<bool, std::string, std::string, int> ARDOUR::CopyConfigurationFile
std::map<std::string, bool> ARDOUR::reserved_io_names;
float ARDOUR::ui_scale_factor = 1.0;
static bool have_old_configuration_files = false;
static bool running_from_gui = false;
static int cpu_dma_latency_fd = -1;
namespace ARDOUR {
extern void setup_enum_writer ();
}
@ -763,6 +766,10 @@ ARDOUR::no_auto_connect ()
return getenv ("ARDOUR_NO_AUTOCONNECT") != 0;
}
void ARDOUR::set_global_ui_scale_factor (float s) {
ui_scale_factor = s;
}
void
ARDOUR::setup_fpu ()
{