Skip to content

Commit

Permalink
[UPnP] Fixed error type
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianCassar committed Dec 26, 2023
1 parent 7f981ef commit f84fcd0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ It should also be noted that due to the way Steam Decks handle configuration, yo
| Saints Row 2 | | [Co-op](https://www.youtube.com/watch?v=YTw84keeWfs), [Setup Guide](https://www.youtube.com/watch?v=nf7TDOtTEIE) |
| Saints Row the Third / The Full Package | Unplayable due to broken graphics. Requires [Online Pass](https://www.xbox.com/en-GB/games/store/online-pass/BS7JTR0MN356) + license_mask |
| Saints Row IV | Unplayable due to broken graphics. Requires Online Pass + license_mask |
| Screwjumper! | |
| Splinter Cell: Double Agent | |
| Star Wars Battlefront III (Unreleased Game) | Alpha, Mar 17 2008 | [Conquest Taoonie](https://www.youtube.com/watch?v=C54jCqFnCmQ), [MP Event Stream](https://www.youtube.com/watch?v=xSpTmsSvP4s) |
| Team Fortress 2 | Mousehook |
Expand Down
4 changes: 2 additions & 2 deletions src/xenia/kernel/upnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class upnp {

uint16_t upnp::get_mapped_bind_port(uint16_t external_port);

std::map<std::string, std::map<uint16_t, uint16_t>>* port_binding_results() {
std::map<std::string, std::map<uint16_t, int32_t>>* port_binding_results() {
return &m_port_binding_results;
};

Expand All @@ -60,7 +60,7 @@ class upnp {
UPNPUrls m_igd_urls{};

std::map<std::string, std::map<uint16_t, uint16_t>> m_port_bindings;
std::map<std::string, std::map<uint16_t, uint16_t>> m_port_binding_results;
std::map<std::string, std::map<uint16_t, int32_t>> m_port_binding_results;

std::map<uint16_t, uint16_t> m_mapped_connect_ports;
std::map<uint16_t, uint16_t> m_mapped_bind_ports;
Expand Down
8 changes: 4 additions & 4 deletions src/xenia/kernel/xsocket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,14 @@ int XSocket::WSARecvFrom(XWSABUF* buffers, uint32_t num_buffers,
}
active_overlapped_ = overlapped_ptr;

if (!pooling_task_.valid()) {
pooling_task_ =
if (!polling_task_.valid()) {
polling_task_ =
std::async(std::launch::async, &XSocket::PollWSARecvFrom, this,
true, receive_async_data);
} else {
auto status = pooling_task_.wait_for(0ms);
auto status = polling_task_.wait_for(0ms);
if (status == std::future_status::ready) {
auto result = pooling_task_.get();
auto result = polling_task_.get();
}
}
SetLastWSAError(X_WSAError::X_WSA_IO_PENDING);
Expand Down
2 changes: 1 addition & 1 deletion src/xenia/kernel/xsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class XSocket : public XObject {
std::mutex incoming_packet_mutex_;
std::queue<uint8_t*> incoming_packets_;

std::future<int> pooling_task_;
std::future<int> polling_task_;

std::mutex receive_mutex_;
std::condition_variable receive_cv_;
Expand Down

0 comments on commit f84fcd0

Please sign in to comment.