mirror of https://github.com/darlinghq/darling
Merge pull request #1591 from Lazerbeak12345/add-missing-open-default-component
fix(CarbonCore): add OpenDefaultComponent stub
This commit is contained in:
commit
b7a59db91e
|
|
@ -138,6 +138,8 @@ long CountComponents(ComponentDescription* desc);
|
|||
|
||||
OSErr OpenAComponent(Component comp, ComponentInstance* out);
|
||||
ComponentInstance OpenComponent(Component comp);
|
||||
ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType);
|
||||
|
||||
OSErr CloseComponent(ComponentInstance inst);
|
||||
|
||||
Component RegisterComponent(ComponentDescription *cd, ComponentRoutineUPP componentEntryPoint, SInt16 global,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ along with Darling. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <CarbonCore/MacMemory.h>
|
||||
#include "ComponentManager.h"
|
||||
|
||||
static int verbose = 0;
|
||||
__attribute__((constructor)) static void initme(void) {
|
||||
verbose = getenv("STUB_VERBOSE") != NULL;
|
||||
}
|
||||
|
||||
Component FindNextComponent(Component prev, ComponentDescription* desc)
|
||||
{
|
||||
std::vector<Component> components = ComponentManager::instance()->findMatching(desc);
|
||||
|
|
@ -85,6 +90,12 @@ ComponentInstance OpenComponent(Component comp)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType)
|
||||
{
|
||||
if (verbose) puts("STUB: OpenDefaultComponent called");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
OSErr CloseComponent(ComponentInstance inst)
|
||||
{
|
||||
return ComponentManager::instance()->dispose(inst);
|
||||
|
|
|
|||
Loading…
Reference in New Issue