Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
967dca12
Commit
967dca12
authored
Jun 01, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preformance
parent
8d8bd503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
gframe/image_manager.cpp
gframe/image_manager.cpp
+16
-14
No files found.
gframe/image_manager.cpp
View file @
967dca12
...
...
@@ -366,22 +366,24 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
tThumb
[
code
]
=
img
;
return
(
img
==
NULL
)
?
tUnknownThumb
:
img
;
}
imageManager
.
tThumbLoadingMutex
.
lock
();
auto
lit
=
tThumbLoading
.
find
(
code
);
if
(
lit
!=
tThumbLoading
.
end
())
{
if
(
lit
->
second
!=
nullptr
)
{
char
file
[
256
];
std
::
snprintf
(
file
,
sizeof
file
,
"pics/thumbnail/%d.jpg"
,
code
);
irr
::
video
::
ITexture
*
texture
=
driver
->
addTexture
(
file
,
lit
->
second
);
// textures must be added in the main thread due to OpenGL
lit
->
second
->
drop
();
tThumb
[
code
]
=
texture
;
}
else
{
tThumb
[
code
]
=
nullptr
;
if
(
tit
==
tThumb
.
end
()
||
tit
->
second
==
tLoading
)
{
imageManager
.
tThumbLoadingMutex
.
lock
();
auto
lit
=
tThumbLoading
.
find
(
code
);
if
(
lit
!=
tThumbLoading
.
end
())
{
if
(
lit
->
second
!=
nullptr
)
{
char
file
[
256
];
std
::
snprintf
(
file
,
sizeof
file
,
"pics/thumbnail/%d.jpg"
,
code
);
irr
::
video
::
ITexture
*
texture
=
driver
->
addTexture
(
file
,
lit
->
second
);
// textures must be added in the main thread due to OpenGL
lit
->
second
->
drop
();
tThumb
[
code
]
=
texture
;
}
else
{
tThumb
[
code
]
=
nullptr
;
}
tThumbLoading
.
erase
(
lit
);
}
tThumbLoading
.
erase
(
lit
);
imageManager
.
tThumbLoadingMutex
.
unlock
();
tit
=
tThumb
.
find
(
code
);
}
imageManager
.
tThumbLoadingMutex
.
unlock
();
tit
=
tThumb
.
find
(
code
);
if
(
tit
==
tThumb
.
end
())
{
tThumb
[
code
]
=
tLoading
;
imageManager
.
tThumbLoadingMutex
.
lock
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment