Commit 7d6477b
committed
gfx/d3d8: Wire up gfx_widgets_frame() in the frame function
The d3d8 backend's widgets_enabled hook was added in 5f23e85 to
advertise widget support to the rest of RA, on the assumption (per
the comment that landed alongside it) that widgets would "work
transparently" once gfx_display was implemented. They didn't —
d3d8_frame was missing the actual gfx_widgets_frame() call that
every other consumer-facing video backend (d3d9/d3d10/d3d11/d3d12,
gl1/gl2/gl3, vulkan, etc.) makes once per frame.
Returning true from widgets_enabled tells RA to route runtime
indicators — fast-forward, rewind, pause, FPS counter, achievement
popups, load-progress bars, status text — into the widget queue
(gfx_widgets_status_text + the per-widget animation state) instead
of falling back to the runloop_msg → font_driver_render_msg path
(see gfx/video_driver.c:4742). With no gfx_widgets_frame call,
that state was assembled every frame but never rendered, so e.g.
holding the fast-forward key produced no on-screen indicator. The
fallback OSD msg path still rendered runloop_msg toasts when an
overlay wasn't masking them, which is what made the regression
look overlay-conditional in practice.
Add the missing pieces:
- Include gfx/gfx_widgets.h behind HAVE_GFX_WIDGETS, matching
the d3d10/d3d9hlsl pattern.
- Capture widgets_active from video_info at frame entry.
- Between the overlay block and the OSD msg block, prepare
the same device state the menu render path uses (reset
menu_display.offset, bind the menu vertex buffer, full-screen
viewport, ALPHABLENDENABLE re-enabled — d3d8_overlay_render
disables it on the way out, defensive FVF) and call
gfx_widgets_frame(video_info).
No outer BeginScene/EndScene wrap is needed: gfx_display_d3d8_draw
and d3d8_font_render_line both wrap their own scene around each
DrawPrimitiveUP, matching the per-draw scene convention used
throughout the rest of the d3d8 menu path.
Also fix the comment on d3d8_gfx_widgets_enabled — the previous
text claimed widgets worked transparently, which was wrong; it now
documents what advertising support actually triggers in RA.1 parent 1dff13b commit 7d6477b
1 file changed
Lines changed: 56 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
2843 | 2846 | | |
2844 | 2847 | | |
2845 | 2848 | | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
2846 | 2852 | | |
2847 | 2853 | | |
2848 | 2854 | | |
| |||
2931 | 2937 | | |
2932 | 2938 | | |
2933 | 2939 | | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
2934 | 2980 | | |
2935 | 2981 | | |
2936 | 2982 | | |
| |||
3216 | 3262 | | |
3217 | 3263 | | |
3218 | 3264 | | |
3219 | | - | |
3220 | | - | |
3221 | | - | |
3222 | | - | |
3223 | | - | |
3224 | | - | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
3225 | 3275 | | |
3226 | 3276 | | |
3227 | 3277 | | |
| |||
0 commit comments