mirror of https://github.com/mgba-emu/mgba.git
Windows C++ fixes
This commit is contained in:
parent
c8d5219212
commit
2415d59d94
|
@ -7,8 +7,8 @@
|
||||||
#include <QStackedLayout>
|
#include <QStackedLayout>
|
||||||
|
|
||||||
#include "GameController.h"
|
#include "GameController.h"
|
||||||
#include "GDBWindow.h"
|
|
||||||
#include "GDBController.h"
|
#include "GDBController.h"
|
||||||
|
#include "GDBWindow.h"
|
||||||
#include "LoadSaveState.h"
|
#include "LoadSaveState.h"
|
||||||
#include "LogView.h"
|
#include "LogView.h"
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ extern "C" {
|
||||||
#include "gba.h"
|
#include "gba.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "GDBController.h"
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include "LoadSaveState.h"
|
#include "LoadSaveState.h"
|
||||||
|
|
||||||
|
@ -16,7 +17,6 @@ struct StartupOptions;
|
||||||
namespace QGBA {
|
namespace QGBA {
|
||||||
|
|
||||||
class GameController;
|
class GameController;
|
||||||
class GDBController;
|
|
||||||
class LogView;
|
class LogView;
|
||||||
class WindowBackground;
|
class WindowBackground;
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,9 @@ static inline Socket SocketOpenTCP(int port, uint32_t bindAddress) {
|
||||||
struct sockaddr_in bindInfo = {
|
struct sockaddr_in bindInfo = {
|
||||||
.sin_family = AF_INET,
|
.sin_family = AF_INET,
|
||||||
.sin_port = htons(port),
|
.sin_port = htons(port),
|
||||||
.sin_addr = {
|
.sin_addr = { 0 }
|
||||||
.s_addr = htonl(bindAddress)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
bindInfo.sin_addr.s_addr = htonl(bindAddress);
|
||||||
int err = bind(sock, (const struct sockaddr*) &bindInfo, sizeof(struct sockaddr_in));
|
int err = bind(sock, (const struct sockaddr*) &bindInfo, sizeof(struct sockaddr_in));
|
||||||
if (err) {
|
if (err) {
|
||||||
close(sock);
|
close(sock);
|
||||||
|
@ -69,10 +68,9 @@ static inline Socket SocketConnectTCP(int port, uint32_t destinationAddress) {
|
||||||
struct sockaddr_in bindInfo = {
|
struct sockaddr_in bindInfo = {
|
||||||
.sin_family = AF_INET,
|
.sin_family = AF_INET,
|
||||||
.sin_port = htons(port),
|
.sin_port = htons(port),
|
||||||
.sin_addr = {
|
.sin_addr = { 0 }
|
||||||
.s_addr = htonl(destinationAddress)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
bindInfo.sin_addr.s_addr = htonl(destinationAddress);
|
||||||
int err = connect(sock, (const struct sockaddr*) &bindInfo, sizeof(struct sockaddr_in));
|
int err = connect(sock, (const struct sockaddr*) &bindInfo, sizeof(struct sockaddr_in));
|
||||||
if (err) {
|
if (err) {
|
||||||
close(sock);
|
close(sock);
|
||||||
|
|
Loading…
Reference in New Issue