From 27dc45ae6e1f938bd31a76d23489c4f96f15ae28 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 18 May 2026 22:54:17 -0700
Subject: [PATCH] NET_Init() should fail in the stub library
This allows applications to know up front that networking is not available.
---
src/SDL_net_stub_only.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_net_stub_only.c b/src/SDL_net_stub_only.c
index 8b716a9..c235022 100644
--- a/src/SDL_net_stub_only.c
+++ b/src/SDL_net_stub_only.c
@@ -23,7 +23,7 @@
// don't do anything. Sorry!
int NET_Version(void) { return SDL_NET_VERSION; }
-bool NET_Init(void) { return true; }
+bool NET_Init(void) { return SDL_Unsupported(); }
void NET_Quit(void) {}
NET_Address * NET_ResolveHostname(const char *host) { SDL_Unsupported(); return NULL; }
NET_Status NET_WaitUntilResolved(NET_Address *address, Sint32 timeout) { SDL_Unsupported(); return NET_FAILURE; }