Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-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
苍蓝
rd-ygopro
Commits
d4e47bc0
Commit
d4e47bc0
authored
Dec 07, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
parents
5b90e861
b7b9c6d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
14 deletions
+25
-14
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-9
gframe/game.cpp
gframe/game.cpp
+21
-5
gframe/game.h
gframe/game.h
+3
-0
No files found.
gframe/duelclient.cpp
View file @
d4e47bc0
...
...
@@ -641,15 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
stHostPrepDuelist
[
pkt
->
pos
]
->
setText
(
name
);
mainGame
->
gMutex
.
Unlock
();
#ifdef _WIN32
FLASHWINFO
fi
;
fi
.
cbSize
=
sizeof
(
FLASHWINFO
);
fi
.
hwnd
=
mainGame
->
hWnd
;
fi
.
dwFlags
=
FLASHW_TRAY
|
FLASHW_TIMERNOFG
;
fi
.
uCount
=
0
;
fi
.
dwTimeout
=
0
;
FlashWindowEx
(
&
fi
);
#endif
mainGame
->
FlashWindow
();
break
;
}
case
STOC_HS_PLAYER_CHANGE
:
{
...
...
gframe/game.cpp
View file @
d4e47bc0
...
...
@@ -71,17 +71,13 @@ bool Game::Initialize() {
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
);
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
SetWindowsIcon
();
//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
);
...
...
@@ -1155,5 +1151,25 @@ int Game::LocalPlayer(int player) {
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
}
void
Game
::
SetWindowsIcon
()
{
#ifdef _WIN32
HINSTANCE
hInstance
=
(
HINSTANCE
)
GetModuleHandleW
(
NULL
);
HICON
hSmallIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
16
,
16
,
LR_DEFAULTCOLOR
);
HICON
hBigIcon
=
(
HICON
)
LoadImageW
(
hInstance
,
MAKEINTRESOURCEW
(
1
),
IMAGE_ICON
,
32
,
32
,
LR_DEFAULTCOLOR
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
long
)
hSmallIcon
);
SendMessageW
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
long
)
hBigIcon
);
#endif
}
void
Game
::
FlashWindow
()
{
#ifdef _WIN32
FLASHWINFO
fi
;
fi
.
cbSize
=
sizeof
(
FLASHWINFO
);
fi
.
hwnd
=
hWnd
;
fi
.
dwFlags
=
FLASHW_TRAY
|
FLASHW_TIMERNOFG
;
fi
.
uCount
=
0
;
fi
.
dwTimeout
=
0
;
FlashWindowEx
(
&
fi
);
#endif
}
}
gframe/game.h
View file @
d4e47bc0
...
...
@@ -114,6 +114,9 @@ public:
return
focus
&&
focus
->
hasType
(
type
);
}
void
SetWindowsIcon
();
void
FlashWindow
();
Mutex
gMutex
;
Mutex
gBuffer
;
Signal
frameSignal
;
...
...
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