void GetLocalisationApiService(void) { if (!WASABI_API_LNG) { // loader so that we can get the localisation service api for use if (!WASABI_API_SVC) { WASABI_API_SVC = (api_service*)SendMessage(winampwnd, WM_WA_IPC, 0, IPC_GET_API_SERVICE); if (WASABI_API_SVC == (api_service*)1) { WASABI_API_SVC = NULL; return; } } if (!WASABI_API_LNG) { waServiceFactory *sf; sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID); if (sf) WASABI_API_LNG = reinterpret_cast<api_language*>(sf->getInterface()); } // need to have this initialised before we try to do anything with localisation features WASABI_API_START_LANG(GetMyInstance(), EncFlakeLangGUID); } }
__declspec( dllexport ) winampVisHeader *winampVisGetHeader(HWND hwndParent) { if(!WASABI_API_LNG_HINST) { // loader so that we can get the localisation service api for use WASABI_API_SVC = (api_service*)SendMessage(hwndParent, WM_WA_IPC, 0, IPC_GET_API_SERVICE); if (WASABI_API_SVC == (api_service*)1) WASABI_API_SVC = NULL; waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID); if (sf) WASABI_API_LNG = reinterpret_cast<api_language*>(sf->getInterface()); sf = WASABI_API_SVC->service_getServiceByGuid(applicationApiServiceGuid); if (sf) WASABI_API_APP = reinterpret_cast<api_application*>(sf->getInterface()); sf = WASABI_API_SVC->service_getServiceByGuid(syscbApiServiceGuid); if (sf) WASABI_API_SYSCB = reinterpret_cast<api_syscb*>(sf->getInterface()); // need to have this initialised before we try to do anything with localisation features WASABI_API_START_LANG(GetMyInstance(),VisMilkdropLangGUID); /* added for v2.25 as a quick work around to allow partial /* keyboard mappings (mainly coming from de-de requirements) ** [yY][Y][yY][zZ] ** 1 2 3 4 ** ** 1 - does yes for the 3 different prompt types ** 2 - does Ctrl+Y for stopping display of custom message of song title ** 3 - something for preset editing (not 100% sure what) ** 4 - used for the previous track sent to Winamp */ WASABI_API_LNGSTRING_BUF(IDS_KEY_MAPPINGS, keyMappings, 8); // as we're under a different thread we need to set the locale //WASABI_API_LNG->UseUserNumericLocale(); g_use_C_locale = WASABI_API_LNG->Get_C_NumericLocale(); } return &hdr; }