Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Resize GUI on AAX & VST3 crash + FIX #46

Open
pylorca opened this issue Sep 12, 2015 · 1 comment
Open

Resize GUI on AAX & VST3 crash + FIX #46

pylorca opened this issue Sep 12, 2015 · 1 comment

Comments

@pylorca
Copy link

pylorca commented Sep 12, 2015

If the gui wasn't created, GetGUI()->reisize() crash protools

To fix:
IGraphics.cpp::IGraphics::IGraphics(IPlugBase* pPlug, int w, int h, int refreshFPS)
add

#ifdef AAX_API
    mAAXViewContainer = 0;
#endif

on IPlugAAX.cpp

void IPlugAAX::ResizeGraphics(int w, int h)
{
    IGraphics* pGraphics = GetGUI();

    if (pGraphics)
    {
        AAX_Point oEffectViewSize;
        oEffectViewSize.horz = (float) w;
        oEffectViewSize.vert = (float) h;

        AAX_IViewContainer* viewContainer = pGraphics->GetViewContainer();

        if (viewContainer)
        {
            viewContainer->SetViewSize(oEffectViewSize);
        }
        OnWindowResize();
    }
}
@pylorca
Copy link
Author

pylorca commented Sep 15, 2015

Same on VST3

to Fix it:
IplugVST3.cpp

void IPlugVST3::ResizeGraphics(int w, int h)
{    
    iif (GetGUI() && viewsArray.total() > 0)
    {
        viewsArray.at(0)->resize(w, h);
    }
    OnWindowResize();
}

@pylorca pylorca changed the title Resize GUI on AAX crash + FIX Resize GUI on AAX & VST3 crash + FIX Sep 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant