Opened 2 years ago
Last modified 4 weeks ago
#13767 new defect
GRAPHICS: OpenGL screenshots not capturing latest frame if no input
Reported by: | lwcorp | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Graphics |
Version: | Keywords: | screenshots, opengl | |
Cc: | Game: | Quest for Glory 1 |
Description (last modified by )
Other than conversation screens (when a character's face is zoomed in), this game has various dialogs like:
1) When you click on something.
2) When you look at something.
3) When you talk to someone that doesn't trigger a zoomed in face (e.g. Crusher and the fencer at the Thieves' Guild when you try to give them objects).
Any of these (except conversations) aren't saved in screenshots. This is unlike QFG3 and QFG4. So if you, for example, look at something and click alt+s, the screenshot won't contain the description of what you looked at.
Change History (9)
comment:1 by , 2 years ago
Summary: | SCI: QFG1VGA - screenshots ignore any dialoge that doesn't involve zoomed in conversations → SCI: QFG1VGA - screenshots ignore any dialog that doesn't involve zoomed in conversations |
---|
comment:2 by , 2 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:3 by , 2 years ago
Summary: | SCI: QFG1VGA - screenshots ignore any dialog that doesn't involve zoomed in conversations → SCI: QFG1VGA - Screenshots exclude message boxes in OpenGL mode |
---|
comment:4 by , 2 years ago
Replying to sluicebox:
Confirmed that this occurs when Graphics Mode is OpenGL on Windows with latest code from master. Does not occur if Graphics Mode is SDL Surface (otherwise I would have noticed right away!)
What you're saying is interesting because a similar and far worse situation exist in the AGS QFG2 (#13348), and it too is related to Windows OpenGL!
comment:5 by , 2 years ago
Component: | Engine: SCI → Graphics |
---|---|
Summary: | SCI: QFG1VGA - Screenshots exclude message boxes in OpenGL mode → GRAPHICS: OpenGL screenshots not capturing latest frame if no input |
This occurs in multiple engines so it appears to be an OpenGL backend issue. If the screenshot hotkey is pressed after a modal message box appears but before the mouse is moved or another key is pressed, then glad_glReadPixels()
returns the image before the message box was displayed.
To reproduce in an SCI game or AGI game:
- Set graphics mode to OpenGL
- During game, click or press a key that brings up a simple modal message box (as opposed to one with an animated portrait)
- Don't move the mouse or press another key
- Press ALT+S to take a screenshot
I've reproduced this in Black Cauldron (AGI), KQ4, KQ6, LB1. Occurs on at least Windows and Mac.
In KQ4, typing "look", pressing enter, and then taking a screenshot gets the input box with the word "look" instead of the message box with the response that replaced it, so a stale frame.
I don't know OpenGL and this isn't SCI specific so I'm renaming and changing component so that the right people see it.
comment:6 by , 2 years ago
Keywords: | screenshots opengl added |
---|
comment:7 by , 6 weeks ago
The issue here is that if there is no screen update (e.g. from mouse movement), no frame is emitted. Sometimes, this happens right before a dialog is shown.
Recently, a new implementation has been added where ScummVM will *always* update the screen, even if there isn't any change.
To enable this:
- Open your scummvm.ini file (for Windows, this is located in C:\Users\<user>\AppData\Roaming\ScummVM)
- Add the following in line 2, under the [scummvm] section, at the very top: force_frame_update=50
- Make sure you're using the OpenGL backend (Global Options -> Graphics mode -> set to OpenGL)
I've just tested the change above, and it seems to solve the issue. Could you please verify it works for you?
comment:9 by , 4 weeks ago
Make sure you're using the OpenGL backend
I use the default mode, so it should be good.
Anyway, when trying ScummVM 2.9.0git9378-g77a589e1c8f (Oct 18 2024 04:48:32):
1) Looking at objects works in screenshots even without any tricks! What changed?
2) As for the rest (clicking and talking without zoomed in faces), force_frame_update=50
seems to indeed work.
Confirmed that this occurs when Graphics Mode is OpenGL on Windows with latest code from master. Does not occur if Graphics Mode is SDL Surface (otherwise I would have noticed right away!)