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
64a6b8ee
Commit
64a6b8ee
authored
Jun 13, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refa server host thing
parent
7789a96d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
gframe/duelclient.cpp
gframe/duelclient.cpp
+9
-2
gframe/duelclient.h
gframe/duelclient.h
+1
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-5
No files found.
gframe/duelclient.cpp
View file @
64a6b8ee
...
...
@@ -37,7 +37,7 @@ std::uniform_real_distribution<float> DuelClient::real_dist;
bool
DuelClient
::
is_refreshing
=
false
;
int
DuelClient
::
match_kill
=
0
;
std::vector<
HostPacket
> DuelClient::hosts;
std
::
vector
<
std
::
wstring
>
DuelClient
::
hosts
;
std
::
vector
<
std
::
wstring
>
DuelClient
::
hosts_srvpro
;
std
::
set
<
std
::
pair
<
unsigned
int
,
unsigned
short
>>
DuelClient
::
remotes
;
event
*
DuelClient
::
resp_event
=
0
;
...
...
@@ -4395,7 +4395,14 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) {
mainGame
->
gMutex
.
lock
();
remotes
.
insert
(
remote
);
pHP
->
ipaddr
=
ipaddr
;
hosts.push_back(*pHP);
wchar_t
host_fulladdr
[
100
];
myswprintf
(
host_fulladdr
,
L"%d.%d.%d.%d:%d"
,
ipaddr
&
0xff
,
(
ipaddr
>>
8
)
&
0xff
,
(
ipaddr
>>
16
)
&
0xff
,
(
ipaddr
>>
24
)
&
0xff
,
pHP
->
port
);
hosts
.
push_back
(
std
::
wstring
(
host_fulladdr
));
std
::
wstring
hoststr
;
hoststr
.
append
(
L"["
);
hoststr
.
append
(
deckManager
.
GetLFListName
(
pHP
->
host
.
lflist
));
...
...
gframe/duelclient.h
View file @
64a6b8ee
...
...
@@ -128,7 +128,7 @@ public:
bufferevent_write
(
client_bev
,
duel_client_write
,
len
+
3
);
}
static
std
::
vector
<
HostPacket
>
hosts
;
static
std
::
vector
<
std
::
wstring
>
hosts
;
static
std
::
vector
<
std
::
wstring
>
hosts_srvpro
;
static
bool
is_srvpro
;
static
void
BeginRefreshHost
();
...
...
gframe/menu_handler.cpp
View file @
64a6b8ee
...
...
@@ -497,11 +497,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
ebJoinPass
->
setText
(
DuelClient
::
hosts_srvpro
[
sel
].
c_str
());
break
;
}
int
addr
=
DuelClient
::
hosts
[
sel
].
ipaddr
;
int
port
=
DuelClient
::
hosts
[
sel
].
port
;
wchar_t
buf
[
22
];
myswprintf
(
buf
,
L"%d.%d.%d.%d:%d"
,
addr
&
0xff
,
(
addr
>>
8
)
&
0xff
,
(
addr
>>
16
)
&
0xff
,
(
addr
>>
24
)
&
0xff
,
port
);
mainGame
->
ebJoinHost
->
setText
(
buf
);
mainGame
->
ebJoinHost
->
setText
(
DuelClient
::
hosts
[
sel
].
c_str
());
break
;
}
case
LISTBOX_REPLAY_LIST
:
{
...
...
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