mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-15 06:20:41 +00:00
Make sure to rewind image file when checking header
This commit is contained in:
@@ -415,6 +415,8 @@ ReplayStatus IMG_CreateReplayDevice(RDCFile *rdc, IReplayDriver **driver)
|
||||
}
|
||||
else
|
||||
{
|
||||
FileIO::fseek64(f, 0, SEEK_SET);
|
||||
|
||||
int width = 0, height = 0;
|
||||
int ignore = 0;
|
||||
int ret = stbi_info_from_file(f, &width, &height, &ignore);
|
||||
@@ -640,6 +642,8 @@ void ImageViewer::RefreshFile()
|
||||
}
|
||||
else
|
||||
{
|
||||
FileIO::fseek64(f, 0, SEEK_SET);
|
||||
|
||||
int ignore = 0;
|
||||
int ret = stbi_info_from_file(f, (int *)&texDetails.width, (int *)&texDetails.height, &ignore);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user