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
Commits
b7b9c6d2
Commit
b7b9c6d2
authored
Dec 06, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
89f030dd
Changes
3
Show 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 @
b7b9c6d2
...
@@ -641,15 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -641,15 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
stHostPrepDuelist
[
pkt
->
pos
]
->
setText
(
name
);
mainGame
->
stHostPrepDuelist
[
pkt
->
pos
]
->
setText
(
name
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
#ifdef _WIN32
mainGame
->
FlashWindow
();
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
break
;
break
;
}
}
case
STOC_HS_PLAYER_CHANGE
:
{
case
STOC_HS_PLAYER_CHANGE
:
{
...
...
gframe/game.cpp
View file @
b7b9c6d2
...
@@ -71,17 +71,13 @@ bool Game::Initialize() {
...
@@ -71,17 +71,13 @@ bool Game::Initialize() {
device
->
setWindowCaption
(
L"YGOPro"
);
device
->
setWindowCaption
(
L"YGOPro"
);
device
->
setResizable
(
false
);
device
->
setResizable
(
false
);
#ifdef _WIN32
#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
();
irr
::
video
::
SExposedVideoData
exposedData
=
driver
->
getExposedVideoData
();
if
(
gameConf
.
use_d3d
)
if
(
gameConf
.
use_d3d
)
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
D3D9
.
HWnd
);
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
D3D9
.
HWnd
);
else
else
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
OpenGLWin32
.
HWnd
);
hWnd
=
reinterpret_cast
<
HWND
>
(
exposedData
.
OpenGLWin32
.
HWnd
);
SendMessage
(
hWnd
,
WM_SETICON
,
ICON_SMALL
,
(
long
)
hSmallIcon
);
SendMessage
(
hWnd
,
WM_SETICON
,
ICON_BIG
,
(
long
)
hBigIcon
);
#endif
#endif
SetWindowsIcon
();
//main menu
//main menu
wchar_t
strbuf
[
256
];
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"YGOPro Version:%X.0%X.%X"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
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) {
...
@@ -1155,5 +1151,25 @@ int Game::LocalPlayer(int player) {
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
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 @
b7b9c6d2
...
@@ -114,6 +114,9 @@ public:
...
@@ -114,6 +114,9 @@ public:
return
focus
&&
focus
->
hasType
(
type
);
return
focus
&&
focus
->
hasType
(
type
);
}
}
void
SetWindowsIcon
();
void
FlashWindow
();
Mutex
gMutex
;
Mutex
gMutex
;
Mutex
gBuffer
;
Mutex
gBuffer
;
Signal
frameSignal
;
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