mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Move generic logger on the Wine side to common.h
We'll also need this for VST2 plugins when we start caching the time info.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include "../editor.h"
|
||||
|
||||
HostBridge::HostBridge(boost::filesystem::path plugin_path)
|
||||
: plugin_path(plugin_path) {}
|
||||
: plugin_path(plugin_path), generic_logger(Logger::create_wine_stderr()) {}
|
||||
|
||||
void HostBridge::handle_win32_events() {
|
||||
MSG msg;
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "../../common/logging/common.h"
|
||||
|
||||
/**
|
||||
* The base for the Wine plugin host bridge interface for all plugin types. This
|
||||
* only has to be able to handle Win32 and X11 events. Implementations of this
|
||||
@@ -87,4 +89,14 @@ class HostBridge {
|
||||
* The path to the .dll being loaded in the Wine plugin host.
|
||||
*/
|
||||
const boost::filesystem::path plugin_path;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* A logger, just like we have on the plugin side. This is normally not
|
||||
* needed because we can just print to STDERR, but this way we can
|
||||
* conditionally hide output based on the verbosity level.
|
||||
*
|
||||
* @see Logger::create_wine_stderr
|
||||
*/
|
||||
Logger generic_logger;
|
||||
};
|
||||
|
||||
@@ -91,7 +91,6 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
|
||||
std::string plugin_dll_path,
|
||||
std::string endpoint_base_dir)
|
||||
: HostBridge(plugin_dll_path),
|
||||
generic_logger(Logger::create_wine_stderr()),
|
||||
logger(generic_logger),
|
||||
main_context(main_context),
|
||||
sockets(main_context.context, endpoint_base_dir, false) {
|
||||
|
||||
@@ -361,9 +361,6 @@ class Vst3Bridge : public HostBridge {
|
||||
void unregister_context_menu(size_t object_instance_id,
|
||||
size_t context_menu_id);
|
||||
|
||||
private:
|
||||
Logger generic_logger;
|
||||
|
||||
public:
|
||||
/**
|
||||
* A logger instance we'll use to log about failed
|
||||
|
||||
Reference in New Issue
Block a user