@@ -2245,11 +2245,9 @@ bool WIN_FlashWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_FlashOperat
2245
2245
return true;
2246
2246
}
2247
2247
2248
- bool WIN_ApplyWindowProgress (SDL_Window * window )
2248
+ bool WIN_ApplyWindowProgress (SDL_VideoDevice * _this , SDL_Window * window )
2249
2249
{
2250
- #ifndef HAVE_SHOBJIDL_CORE_H
2251
- return false;
2252
- #else
2250
+ #ifdef HAVE_SHOBJIDL_CORE_H
2253
2251
SDL_WindowData * data = window -> internal ;
2254
2252
if (!data -> taskbar_button_created ) {
2255
2253
return true;
@@ -2261,7 +2259,7 @@ bool WIN_ApplyWindowProgress(SDL_Window* window)
2261
2259
}
2262
2260
2263
2261
TBPFLAG tbpFlags ;
2264
- switch (data -> progress_state ) {
2262
+ switch (window -> progress_state ) {
2265
2263
case SDL_PROGRESS_STATE_NONE :
2266
2264
tbpFlags = TBPF_NOPROGRESS ;
2267
2265
break ;
@@ -2286,55 +2284,14 @@ bool WIN_ApplyWindowProgress(SDL_Window* window)
2286
2284
return WIN_SetErrorFromHRESULT ("ITaskbarList3::SetProgressState()" , ret );
2287
2285
}
2288
2286
2289
- if (data -> progress_state >= SDL_PROGRESS_STATE_NORMAL ) {
2290
- ret = taskbar_list -> lpVtbl -> SetProgressValue (taskbar_list , data -> hwnd , (ULONGLONG )(data -> progress_value * 10000.f ), 10000 );
2287
+ if (window -> progress_state >= SDL_PROGRESS_STATE_NORMAL ) {
2288
+ ret = taskbar_list -> lpVtbl -> SetProgressValue (taskbar_list , data -> hwnd , (ULONGLONG )(window -> progress_value * 10000.f ), 10000 );
2291
2289
if (FAILED (ret )) {
2292
2290
return WIN_SetErrorFromHRESULT ("ITaskbarList3::SetProgressValue()" , ret );
2293
2291
}
2294
2292
}
2295
-
2296
- return true;
2297
- #endif
2298
- }
2299
-
2300
- bool WIN_SetWindowProgressState (SDL_VideoDevice * _this , SDL_Window * window , SDL_ProgressState state )
2301
- {
2302
- #ifndef HAVE_SHOBJIDL_CORE_H
2303
- return SDL_Unsupported ();
2304
- #else
2305
- window -> internal -> progress_state = state ;
2306
- return WIN_ApplyWindowProgress (window );
2307
- #endif
2308
- }
2309
-
2310
- SDL_ProgressState WIN_GetWindowProgressState (SDL_VideoDevice * _this , SDL_Window * window )
2311
- {
2312
- #ifndef HAVE_SHOBJIDL_CORE_H
2313
- SDL_Unsupported ();
2314
- return SDL_PROGRESS_STATE_INVALID ;
2315
- #else
2316
- return window -> internal -> progress_state ;
2317
- #endif // HAVE_SHOBJIDL_CORE_H
2318
- }
2319
-
2320
- bool WIN_SetWindowProgressValue (SDL_VideoDevice * _this , SDL_Window * window , float value )
2321
- {
2322
- #ifndef HAVE_SHOBJIDL_CORE_H
2323
- return SDL_Unsupported ();
2324
- #else
2325
- window -> internal -> progress_value = value ;
2326
- return WIN_ApplyWindowProgress (window );
2327
2293
#endif
2328
- }
2329
-
2330
- float WIN_GetWindowProgressValue (SDL_VideoDevice * _this , SDL_Window * window )
2331
- {
2332
- #ifndef HAVE_SHOBJIDL_CORE_H
2333
- SDL_Unsupported ();
2334
- return -1.0f ;
2335
- #else
2336
- return window -> internal -> progress_value ;
2337
- #endif // HAVE_SHOBJIDL_CORE_H
2294
+ return true;
2338
2295
}
2339
2296
2340
2297
void WIN_ShowWindowSystemMenu (SDL_Window * window , int x , int y )
0 commit comments