Pass a double pointer rather than a reference to a pointer to wait_for_cache_thread. Fixes endless 'caching' of fonts on linux.
Originally committed to SVN as r4843.
This commit is contained in:
parent
1f894561c3
commit
1b8b53c14e
1 changed files with 5 additions and 5 deletions
|
@ -121,13 +121,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void wait_for_cache_thread(FontConfigCacheThread const * const & cache_worker) {
|
static void wait_for_cache_thread(FontConfigCacheThread const * const * const cache_worker) {
|
||||||
if (!cache_worker) return;
|
if (!*cache_worker) return;
|
||||||
|
|
||||||
bool canceled;
|
bool canceled;
|
||||||
DialogProgress *progress = new DialogProgress(AegisubApp::Get()->frame, L"", &canceled, L"Caching fonts", 0, 1);
|
DialogProgress *progress = new DialogProgress(AegisubApp::Get()->frame, L"", &canceled, L"Caching fonts", 0, 1);
|
||||||
progress->Show();
|
progress->Show();
|
||||||
while (cache_worker) {
|
while (*cache_worker) {
|
||||||
if (canceled) throw agi::UserCancelException("Font caching cancelled");
|
if (canceled) throw agi::UserCancelException("Font caching cancelled");
|
||||||
progress->Pulse();
|
progress->Pulse();
|
||||||
wxYield();
|
wxYield();
|
||||||
|
@ -139,7 +139,7 @@ static void wait_for_cache_thread(FontConfigCacheThread const * const & cache_wo
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
///
|
///
|
||||||
LibassSubtitlesProvider::LibassSubtitlesProvider(std::string) {
|
LibassSubtitlesProvider::LibassSubtitlesProvider(std::string) {
|
||||||
wait_for_cache_thread(cache_worker);
|
wait_for_cache_thread(&cache_worker);
|
||||||
|
|
||||||
// Initialize renderer
|
// Initialize renderer
|
||||||
ass_track = NULL;
|
ass_track = NULL;
|
||||||
|
@ -147,7 +147,7 @@ LibassSubtitlesProvider::LibassSubtitlesProvider(std::string) {
|
||||||
if (!ass_renderer) throw _T("ass_renderer_init failed");
|
if (!ass_renderer) throw _T("ass_renderer_init failed");
|
||||||
ass_set_font_scale(ass_renderer, 1.);
|
ass_set_font_scale(ass_renderer, 1.);
|
||||||
new FontConfigCacheThread(ass_renderer, &cache_worker);
|
new FontConfigCacheThread(ass_renderer, &cache_worker);
|
||||||
wait_for_cache_thread(cache_worker);
|
wait_for_cache_thread(&cache_worker);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Destructor
|
/// @brief Destructor
|
||||||
|
|
Loading…
Reference in a new issue