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
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
MyCard
ygopro
Commits
9808111f
Commit
9808111f
authored
Sep 24, 2016
by
独孤朲
Committed by
GitHub
Sep 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1844 from mercury233/patch-icon
set window icon
parents
be0df3bc
be90faf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
gframe/game.cpp
gframe/game.cpp
+15
-2
No files found.
gframe/game.cpp
View file @
9808111f
...
...
@@ -66,8 +66,21 @@ bool Game::Initialize() {
guiFont
=
irr
::
gui
::
CGUITTFont
::
createTTFont
(
env
,
gameConf
.
textfont
,
gameConf
.
textfontsize
);
textFont
=
guiFont
;
smgr
=
device
->
getSceneManager
();
device
->
setWindowCaption
(
L"
[---]
"
);
device
->
setWindowCaption
(
L"
YGOPro
"
);
device
->
setResizable
(
false
);
#ifdef _WIN32
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetModuleHandle
(
NULL
);
HICON
hSmallIcon
=
(
HICON
)
LoadImage
(
hInstance
,
MAKEINTRESOURCE
(
1
),
IMAGE_ICON
,
16
,
16
,
LR_DEFAULTCOLOR
);
HICON
hBigIcon
=
(
HICON
)
LoadImage
(
hInstance
,
MAKEINTRESOURCE
(
1
),
IMAGE_ICON
,
32
,
32
,
LR_DEFAULTCOLOR
);
HWND
hWnd
;
irr
::
video
::
SExposedVideoData
exposedData
=
driver
->
getExposedVideoData
();
if
(
gameConf
.
use_d3d
)
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
D3D9
.
HWnd
);
else
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
OpenGLWin32
.
HWnd
);
SendMessage
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
long
)
hSmallIcon
);
SendMessage
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
long
)
hBigIcon
);
#endif
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"YGOPro Version:%X.0%X.%X"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
...
...
@@ -632,7 +645,7 @@ void Game::MainLoop() {
usleep
(
20000
);
#endif
if
(
cur_time
>=
1000
)
{
myswprintf
(
cap
,
L"FPS: %d"
,
fps
);
myswprintf
(
cap
,
L"
YGOPro
FPS: %d"
,
fps
);
device
->
setWindowCaption
(
cap
);
fps
=
0
;
cur_time
-=
1000
;
...
...
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