repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Wonder if this could be a candidate for the system module. Other parts of SFML that use timeouts, could also offer this callback option.
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "Wonder if this could be a candidate for the system module. Other parts of SFML that use timeouts, could also offer this callback option.", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,998 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Sim...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
TimeoutPredicate currently sounds more like it would timeout if a certain predicate is true, rather than it will timeout and only-continue if the predicate is true. Maybe "ContinuationPredicate" would be more fitting, but I feel like something with "Timeout" in it, makes the usage more easily understood. Maybe Timeou...
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "TimeoutPredicate currently sounds more like it would timeout if a certain predicate is true, rather than it will timeout and only-continue if the predicate is true.\n\nMaybe \"ContinuationPredicate\" would be more fitting, but I feel like something with \"Timeout\" in it, makes the usage more easi...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Why choose Result over Response as with `sf::Ftp`?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "Why choose Result over Response as with `sf::Ftp`?", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,998 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laurent@s...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Should we mention something more since it's not just an `sf::Time` instance, but a `sf::TimeoutPredicate`?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "Should we mention something more since it's not just an `sf::Time` instance, but a `sf::TimeoutPredicate`?", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,998 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Librar...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
For sockets you went with `const std::byte*`, any reason to stick to `const char*` here?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "For sockets you went with `const std::byte*`, any reason to stick to `const char*` here?", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,998 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
```suggestion if (length == 0) { return std::nullopt; } ```
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/src/SFML/Network/Sftp.cpp b/src/SFML/Network/Sftp.cpp new file mode 100644 index 0000000000..95ab95a45e --- /dev/null +++ b/src/SFML/Network/Sftp.cpp @@ -0,0 +1,1347 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-202...
[ "src/SFML/Network/Sftp.cpp" ]
[ { "comment": "```suggestion\n if (length == 0)\n {\n return std::nullopt;\n }\n```", "path": "src/SFML/Network/Sftp.cpp", "hunk": "@@ -0,0 +1,1375 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Co...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Could potentially be shared with the other login overload.
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/src/SFML/Network/Sftp.cpp b/src/SFML/Network/Sftp.cpp new file mode 100644 index 0000000000..95ab95a45e --- /dev/null +++ b/src/SFML/Network/Sftp.cpp @@ -0,0 +1,1347 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-202...
[ "src/SFML/Network/Sftp.cpp" ]
[ { "comment": "Could potentially be shared with the other login overload.", "path": "src/SFML/Network/Sftp.cpp", "hunk": "@@ -0,0 +1,1375 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laur...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Am I assuming correctly, that this wouldn't cause issues on systems where no internet connection can be made?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/test/Network/Sftp.test.cpp b/test/Network/Sftp.test.cpp new file mode 100644 index 0000000000..27adfd6cf2 --- /dev/null +++ b/test/Network/Sftp.test.cpp @@ -0,0 +1,179 @@ +#include <SFML/Network/Sftp.hpp> + +// Other 1st party headers +#include <SFML/Network/IpAddress.hpp> + +#include <catch2/catch_test_ma...
[ "test/Network/Sftp.test.cpp" ]
[ { "comment": "Am I assuming correctly, that this wouldn't cause issues on systems where no internet connection can be made?", "path": "test/Network/Sftp.test.cpp", "hunk": "@@ -0,0 +1,215 @@\n+#include <SFML/Network/Sftp.hpp>\n+\n+// Other 1st party headers\n+#include <SFML/Network/IpAddress.hpp>\n+\n+#...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Is this a candidate for `std::optional`?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "Is this a candidate for `std::optional`?", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,1038 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.o...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Is this a candidate for `std::optional`?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "Is this a candidate for `std::optional`?", "path": "include/SFML/Network/Sftp.hpp", "hunk": "@@ -0,0 +1,1038 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.o...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
I feel like we should support this kind of API, but we currently don't, because `connect()` only takes an `IpAddress` which can't implicitly convert from `const char*` or `std::string`. Not sure if `Sftp` should get this option or if we need to stick with `IpAddress::fromString`
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/include/SFML/Network/Sftp.hpp b/include/SFML/Network/Sftp.hpp new file mode 100644 index 0000000000..9be101d562 --- /dev/null +++ b/include/SFML/Network/Sftp.hpp @@ -0,0 +1,987 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (...
[ "include/SFML/Network/Sftp.hpp" ]
[ { "comment": "I feel like we should support this kind of API, but we currently don't, because `connect()` only takes an `IpAddress` which can't implicitly convert from `const char*` or `std::string`.\n\nNot sure if `Sftp` should get this option or if we need to stick with `IpAddress::fromString`", "path": "...
true
SFML/SFML
3,675
comment_to_fix
Added support for SFTP as a replacement for FTP
Shouldn't we handle the special case `sf::Time::Zero` somewhere here?
ae01ab9e7137da4dce9feb4b0db52e30910499e9
c33977a7e4e78d6d368598e1a6063aea606abd66
diff --git a/src/SFML/Network/Sftp.cpp b/src/SFML/Network/Sftp.cpp new file mode 100644 index 0000000000..95ab95a45e --- /dev/null +++ b/src/SFML/Network/Sftp.cpp @@ -0,0 +1,1347 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-202...
[ "src/SFML/Network/Sftp.cpp" ]
[ { "comment": "Shouldn't we handle the special case `sf::Time::Zero` somewhere here?", "path": "src/SFML/Network/Sftp.cpp", "hunk": "@@ -0,0 +1,1377 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent G...
true
SFML/SFML
3,683
issue_to_patch
Fixed sf::SocketSelector epoll implementation not correctly interpreting sf::Time::Zero as a request to wait indefinitely
Title. This bug was introduced with the recent rewrite of the `sf::SocketSelector` implementation to make use of epoll and kqueue. The other implementations handle `sf::Time::Zero` correctly.
a47d27915c51d68b3a6f5878d8f6d470926457f4
65ac24f0591633d0ba04aa776bc51025d38ba3c7
diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 0c6ff41851..21d577f7a2 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -194,7 +194,10 @@ struct SocketSelector::SocketSelectorImpl bool wait(Time timeout) { event...
[ "src/SFML/Network/SocketSelector.cpp" ]
[]
true
SFML/SFML
3,648
issue_to_patch
sf::Mouse::setPosition does not move cursor on macOS ## Subject of the issue sf::Mouse::setPosition doesn't seem to work on Mojave (10.14.4). No error is thrown but the cursor does not move. ## Your environment * macOS Mojave (10.4.4) * SFML 2.5.1 (also tested on git master) * LLVM 10.0.1 (clang-1001.0.46.3...
Use CGWarpMouseCursorPosition to set mouse position on macOS
Fixes #1574 Posting an event as the current implementation does will only update the position once the event has been processed, so if you call `getPosition` immediately after `setPosition` it will return a value different to what you set Using `CGWarpMouseCursorPosition` as suggested on the issue fixes this beh...
95ddf1ff89d41a03537924f2fb49fb35212e0154
c1d70bbd97774b42d6853a978424a56038e689c0
diff --git a/src/SFML/Window/macOS/InputImpl.mm b/src/SFML/Window/macOS/InputImpl.mm index ddafe45e0f..f5986b6674 100644 --- a/src/SFML/Window/macOS/InputImpl.mm +++ b/src/SFML/Window/macOS/InputImpl.mm @@ -212,13 +212,7 @@ void setMousePosition(Vector2i position) const CGPoint pos = CGPointMake(position.x / sca...
[ "src/SFML/Window/macOS/InputImpl.mm" ]
[]
true
SFML/SFML
3,649
issue_to_patch
Legacy MacOS NSOpenGLPixelFormat failure and fix Forum post: https://en.sfml-dev.org/forums/index.php?topic=26922.0 ---- ## Crash on MacOS 10.10 due to NSOpenGLPixelFormat On MacOS 10.10, in SFContext.mm, function SFContext::createContext, this line ```NSOpenGLPixelFormat* pixFmt = [[NSOpenGLPixelFormat allo...
Remove NSOpenGLPFAAccelerated attribute to allow mac software renderer
Fixes #1640 Per docs, hardware acceleration is still preferred. Don't think we're explicit about which macOS versions we support outside of `CMAKE_OSX_DEPLOYMENT_TARGET` which we set to 13, I don't see any harm in supporting older versions with this change, and it may also be useful for software rendering on new...
95ddf1ff89d41a03537924f2fb49fb35212e0154
7900fab0cddeeb8fa476fd969e65352a0f4a9fe0
diff --git a/src/SFML/Window/macOS/SFContext.mm b/src/SFML/Window/macOS/SFContext.mm index c0eafecb9b..9f66824624 100644 --- a/src/SFML/Window/macOS/SFContext.mm +++ b/src/SFML/Window/macOS/SFContext.mm @@ -203,9 +203,6 @@ // Antialiasing level attrs.push_back(NSOpenGLPFASamples); attrs.push_...
[ "src/SFML/Window/macOS/SFContext.mm" ]
[]
true
SFML/SFML
3,674
issue_to_patch
SocketSelector can't wait for writability ## Subject of the issue Currently I can't write an efficient single-threaded server with SFML, because `SocketSelector` only lets me wait for a socket to become readable, not writable. If a socket's outgoing buffer gets full, I have to keep trying writes in a loop, which se...
Improve sf::SocketSelector usability and scalability
Until now `sf::SocketSelector` has relied on a `select()`-based implementation (hence the name `SocketSelector`). `select()` is a pretty ancient function and originates from a time when computers were very resource constrained. Along with many other beliefs at the time, such as that nobody would need more than X KB of ...
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/extlibs/headers/wepoll/wepoll.h b/extlibs/headers/wepoll/wepoll.h new file mode 100644 index 0000000000..9eb499f25b --- /dev/null +++ b/extlibs/headers/wepoll/wepoll.h @@ -0,0 +1,2249 @@ +/* + * wepoll - epoll for Windows + * https://github.com/piscisaureus/wepoll + * + * Copyright 2012-2020, Bert Belder <...
[ "extlibs/headers/wepoll/wepoll.h", "include/SFML/Network/SocketSelector.hpp", "readme.md", "src/SFML/Network/CMakeLists.txt", "src/SFML/Network/SocketSelector.cpp", "src/SFML/Network/TcpSocket.cpp", "test/Network/SocketSelector.test.cpp" ]
[ { "comment": "Why introduce an alias to start with?", "path": "include/SFML/Network/SocketSelector.hpp", "hunk": "@@ -45,6 +46,18 @@ class Socket;\n class SFML_NETWORK_API SocketSelector\n {\n public:\n+ ////////////////////////////////////////////////////////////\n+ /// \\brief Type of readiness ...
diff --git a/test/Network/SocketSelector.test.cpp b/test/Network/SocketSelector.test.cpp index 4d3ea46ad9..b8d86e63e6 100644 --- a/test/Network/SocketSelector.test.cpp +++ b/test/Network/SocketSelector.test.cpp @@ -1,12 +1,21 @@ #include <SFML/Network/SocketSelector.hpp> // Other 1st party headers +#include <SFML/N...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Why introduce an alias to start with?
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index ac80a870bc..a4e643dade 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -31,8 +31,11 @@ #include <SFML/System/Time.hpp> +#include <functional> #include <memory>...
[ "include/SFML/Network/SocketSelector.hpp" ]
[ { "comment": "Why introduce an alias to start with?", "path": "include/SFML/Network/SocketSelector.hpp", "hunk": "@@ -45,6 +46,18 @@ class Socket;\n class SFML_NETWORK_API SocketSelector\n {\n public:\n+ ////////////////////////////////////////////////////////////\n+ /// \\brief Type of readiness ...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Do we handling this "detach" callback function the same way in other places (e.g. audio processing)?
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index ac80a870bc..a4e643dade 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -31,8 +31,11 @@ #include <SFML/System/Time.hpp> +#include <functional> #include <memory>...
[ "include/SFML/Network/SocketSelector.hpp" ]
[ { "comment": "Do we handling this \"detach\" callback function the same way in other places (e.g. audio processing)?", "path": "include/SFML/Network/SocketSelector.hpp", "hunk": "@@ -90,17 +103,62 @@ class SFML_NETWORK_API SocketSelector\n ////////////////////////////////////////////////////////////...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Is there are risk of write-starvation, when the read event is always short circuited?
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 3394ee75fc..0c6ff41851 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -25,16 +25,42 @@ //////////////////////////////////////////////////////////// // Headers //////////////////...
[ "src/SFML/Network/SocketSelector.cpp" ]
[ { "comment": "Is there are risk of write-starvation, when the read event is always short circuited?", "path": "src/SFML/Network/SocketSelector.cpp", "hunk": "@@ -46,164 +72,668 @@ namespace sf\n ////////////////////////////////////////////////////////////\n struct SocketSelector::SocketSelectorImpl\n {\...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Is it a problem that we modify the socket's userData, even though we still might return `false` later on? Or asked differently, do we need to unset the `callback` before returning `false`
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 3394ee75fc..0c6ff41851 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -25,16 +25,42 @@ //////////////////////////////////////////////////////////// // Headers //////////////////...
[ "src/SFML/Network/SocketSelector.cpp" ]
[ { "comment": "Is it a problem that we modify the socket's userData, even though we still might return `false` later on? Or asked differently, do we need to unset the `callback` before returning `false`", "path": "src/SFML/Network/SocketSelector.cpp", "hunk": "@@ -46,164 +72,668 @@ namespace sf\n ///////...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Why track the count separately?
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 3394ee75fc..0c6ff41851 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -25,16 +25,42 @@ //////////////////////////////////////////////////////////// // Headers //////////////////...
[ "src/SFML/Network/SocketSelector.cpp" ]
[ { "comment": "Why track the count separately?", "path": "src/SFML/Network/SocketSelector.cpp", "hunk": "@@ -46,164 +72,668 @@ namespace sf\n ////////////////////////////////////////////////////////////\n struct SocketSelector::SocketSelectorImpl\n {\n- fd_set allSockets{}; //!< Set containing all t...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
Should we use `size()` here if we do unchecked access on the vector?
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/src/SFML/Network/SocketSelector.cpp b/src/SFML/Network/SocketSelector.cpp index 3394ee75fc..0c6ff41851 100644 --- a/src/SFML/Network/SocketSelector.cpp +++ b/src/SFML/Network/SocketSelector.cpp @@ -25,16 +25,42 @@ //////////////////////////////////////////////////////////// // Headers //////////////////...
[ "src/SFML/Network/SocketSelector.cpp" ]
[ { "comment": "Should we use `size()` here if we do unchecked access on the vector?", "path": "src/SFML/Network/SocketSelector.cpp", "hunk": "@@ -46,164 +72,668 @@ namespace sf\n ////////////////////////////////////////////////////////////\n struct SocketSelector::SocketSelectorImpl\n {\n- fd_set allS...
true
SFML/SFML
3,674
comment_to_fix
Improve sf::SocketSelector usability and scalability
```suggestion /// ready to send data on. Specifying ```
047da4f6ecd62c384a96057ca97ecf4fa78f8873
653fbdcf42b83f1e2d5298bbc9186c94746648cb
diff --git a/include/SFML/Network/SocketSelector.hpp b/include/SFML/Network/SocketSelector.hpp index ac80a870bc..a4e643dade 100644 --- a/include/SFML/Network/SocketSelector.hpp +++ b/include/SFML/Network/SocketSelector.hpp @@ -31,8 +31,11 @@ #include <SFML/System/Time.hpp> +#include <functional> #include <memory>...
[ "include/SFML/Network/SocketSelector.hpp" ]
[ { "comment": "```suggestion\n /// ready to send data on. Specifying\n```", "path": "include/SFML/Network/SocketSelector.hpp", "hunk": "@@ -90,17 +105,65 @@ class SFML_NETWORK_API SocketSelector\n ////////////////////////////////////////////////////////////\n /// \\brief Add a new socket to th...
true
SFML/SFML
3,667
issue_to_patch
IPv6 support > Note that sf::IpAddress currently doesn't support IPv6 nor other types of network addresses. I can see this in the docs, but will it be available some time in the future? C4996: inet_ntoa, inet_addr, is deprecated using MSVC [sfml-network] Using Visual Studio 14: MSVC 19.0.23506.0 Looks like I'm get...
Add support for IPv6 and more types of DNS queries
Yet another necessary step to update SFML's implementation to modern standards. IPv6 has been around for quite a while now and is the only real solution to IPv4 address exhaustion. Most serious ISPs that already had allocated IPv4 blocks now provide usable dual-stack implementations. Newer ISPs (or cost-optimized IS...
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 9801599d75..bece2bf1bb 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -28,7 +28,7 @@ jobs: - { name: Linux OpenGL ES, os: ubuntu-24.04, flags: -DSFML_OPENGL_ES=ON } - { name: macOS, ...
[ ".github/workflows/analyze.yml", ".github/workflows/build.yml", "examples/sockets/TCP.cpp", "examples/sockets/UDP.cpp", "examples/voip/Client.cpp", "include/SFML/Network.hpp", "include/SFML/Network/Dns.hpp", "include/SFML/Network/Http.hpp", "include/SFML/Network/IpAddress.hpp", "include/SFML/Netwo...
[ { "comment": "What about `std::optional<std::vector<sf::IpAddress>>`?", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,211 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laure...
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3fa16c336e..0db6ece5e8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,7 +31,7 @@ add_library(sfml-test-main STATIC TestUtilities/AudioUtil.cpp ) target_include_directories(sfml-test-main PUBLIC TestUtilities) -target_link_libraries(s...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
What about `std::optional<std::vector<sf::IpAddress>>`?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "What about `std::optional<std::vector<sf::IpAddress>>`?", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,211 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laure...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
What about `std::optional<Time>`?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "What about `std::optional<Time>`?", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,211 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (laurent@sfml-dev.org)\n+//\...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Maybe we should show what you could do with these `auto` types? I mean it's a list of strings, but that's not clear from the example code.
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "Maybe we should show what you could do with these `auto` types? I mean it's a list of strings, but that's not clear from the example code.", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,211 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Si...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
What's an "any type"?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/IpAddress.hpp b/include/SFML/Network/IpAddress.hpp index e62651f30c..7d252eca13 100644 --- a/include/SFML/Network/IpAddress.hpp +++ b/include/SFML/Network/IpAddress.hpp @@ -31,10 +31,12 @@ #include <SFML/System/Time.hpp> +#include <array> #include <iosfwd> #include <optional> #...
[ "include/SFML/Network/IpAddress.hpp" ]
[ { "comment": "What's an \"any type\"?", "path": "include/SFML/Network/IpAddress.hpp", "hunk": "@@ -48,21 +50,35 @@ namespace sf\n class SFML_NETWORK_API IpAddress\n {\n public:\n+ ////////////////////////////////////////////////////////////\n+ /// \\brief Type of IP address\n+ ///\n+ ///////...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Should this be part of the socket or part of the IpAddress?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Socket.hpp b/include/SFML/Network/Socket.hpp index 2b7b79fa62..964f9bb1e3 100644 --- a/include/SFML/Network/Socket.hpp +++ b/include/SFML/Network/Socket.hpp @@ -29,6 +29,7 @@ //////////////////////////////////////////////////////////// #include <SFML/Network/Export.hpp> +#include <...
[ "include/SFML/Network/Socket.hpp" ]
[ { "comment": "Should this be part of the socket or part of the IpAddress?", "path": "include/SFML/Network/Socket.hpp", "hunk": "@@ -121,6 +121,16 @@ class SFML_NETWORK_API Socket\n [[nodiscard]] bool isBlocking() const;\n \n protected:\n+ //////////////////////////////////////////////////////////...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Should this be added at the top level?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3fa16c336e..0db6ece5e8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,7 +31,7 @@ add_library(sfml-test-main STATIC TestUtilities/AudioUtil.cpp ) target_include_directories(sfml-test-main PUBLIC TestUtilities) -target_link_libraries(s...
[ "test/CMakeLists.txt" ]
[ { "comment": "Should this be added at the top level?", "path": "test/CMakeLists.txt", "hunk": "@@ -31,7 +31,7 @@ add_library(sfml-test-main STATIC\n TestUtilities/AudioUtil.cpp\n )\n target_include_directories(sfml-test-main PUBLIC TestUtilities)\n-target_link_libraries(sfml-test-main PUBLIC SFML::S...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion /// \return List of IP addresses the given hostname resolves to, `std::nullopt` is returned if name resolution fails, an empty list is returned if the hostname could not be resolved to any address ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "```suggestion\n/// \\return List of IP addresses the given hostname resolves to, `std::nullopt` is returned if name resolution fails, an empty list is returned if the hostname could not be resolved to any address\n```", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,213 @@\n+/...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
If one of the resolves can fail, should both be asserted here?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "If one of the resolves can fail, should both be asserted here?", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,209 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+using namespace std::string_literals;\n+using...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
I've added a AAAA record for sfml-dev.org
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "I've added a AAAA record for sfml-dev.org", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,209 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+using namespace std::string_literals;\n+using namespace std::strin...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Why is the major http version 0 here?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Http.test.cpp b/test/Network/Http.test.cpp index 745f26d26f..5adaa4c573 100644 --- a/test/Network/Http.test.cpp +++ b/test/Network/Http.test.cpp @@ -73,7 +73,7 @@ TEST_CASE("[Network] sf::Http") } } -TEST_CASE("[Network] sf::Http Connection", runConnectionTests()) +TEST_CASE("[Network]...
[ "test/Network/Http.test.cpp" ]
[ { "comment": "Why is the major http version 0 here?", "path": "test/Network/Http.test.cpp", "hunk": "@@ -148,21 +151,21 @@ TEST_CASE(\"[Network] sf::Http Connection\", runConnectionTests())\n \n SECTION(\"HEAD Request\")\n {\n- http.setHost(\"https://codeload.github.com\");\n-...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Any advantage of `std::chrono` over `sf::Clock` / `sf::Time` here?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/src/SFML/Network/Dns.cpp b/src/SFML/Network/Dns.cpp new file mode 100644 index 0000000000..c49d28c803 --- /dev/null +++ b/src/SFML/Network/Dns.cpp @@ -0,0 +1,983 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2025 La...
[ "src/SFML/Network/Dns.cpp" ]
[ { "comment": "Any advantage of `std::chrono` over `sf::Clock` / `sf::Time` here?", "path": "src/SFML/Network/Dns.cpp", "hunk": "@@ -0,0 +1,954 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Am I reading this correctly, that it's calling all servers for every query? I guess since the sending is cheap, it doesn't matter?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/src/SFML/Network/Dns.cpp b/src/SFML/Network/Dns.cpp new file mode 100644 index 0000000000..c49d28c803 --- /dev/null +++ b/src/SFML/Network/Dns.cpp @@ -0,0 +1,983 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2025 La...
[ "src/SFML/Network/Dns.cpp" ]
[ { "comment": "Am I reading this correctly, that it's calling all servers for every query?\n\nI guess since the sending is cheap, it doesn't matter?", "path": "src/SFML/Network/Dns.cpp", "hunk": "@@ -0,0 +1,954 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and ...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Is this a clang-format oddity or why is it different than on line 500 etc?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/src/SFML/Network/Dns.cpp b/src/SFML/Network/Dns.cpp new file mode 100644 index 0000000000..c49d28c803 --- /dev/null +++ b/src/SFML/Network/Dns.cpp @@ -0,0 +1,983 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2025 La...
[ "src/SFML/Network/Dns.cpp" ]
[ { "comment": "Is this a clang-format oddity or why is it different than on line 500 etc?", "path": "src/SFML/Network/Dns.cpp", "hunk": "@@ -0,0 +1,954 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Lauren...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
If it's just for Android, maybe we could call it `getServersOnAndroid` or something
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/src/SFML/Network/Dns.cpp b/src/SFML/Network/Dns.cpp new file mode 100644 index 0000000000..c49d28c803 --- /dev/null +++ b/src/SFML/Network/Dns.cpp @@ -0,0 +1,983 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2025 La...
[ "src/SFML/Network/Dns.cpp" ]
[ { "comment": "If it's just for Android, maybe we could call it `getServersOnAndroid` or something", "path": "src/SFML/Network/Dns.cpp", "hunk": "@@ -0,0 +1,954 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-20...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Any reason to return just one of the addresses and no the whole list?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "Any reason to return just one of the addresses and no the whole list?", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,213 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Are you intentionally avoiding `sf::Clock` here?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/TcpLoopback.test.cpp b/test/Network/TcpLoopback.test.cpp index e71be30a2e..592486af19 100644 --- a/test/Network/TcpLoopback.test.cpp +++ b/test/Network/TcpLoopback.test.cpp @@ -55,7 +55,7 @@ std::mt19937 rng(rd()); std::uniform_int_distribution dist; } // namespace -TEST_C...
[ "test/Network/TcpLoopback.test.cpp" ]
[ { "comment": "Are you intentionally avoiding `sf::Clock` here?", "path": "test/Network/TcpLoopback.test.cpp", "hunk": "@@ -240,3 +240,366 @@ TEST_CASE(\"[Network] sf::Tcp Loopback\", runLoopbackTests())\n CHECK(std::equal(buffer.begin(), buffer.end(), testData.begin()));\n }\n }\n+\n+TEST_CA...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
`Any` is no longer a type. Does this change anything about the code?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/src/SFML/Network/IpAddress.cpp b/src/SFML/Network/IpAddress.cpp index a0d082c16e..fd3f7c1212 100644 --- a/src/SFML/Network/IpAddress.cpp +++ b/src/SFML/Network/IpAddress.cpp @@ -25,17 +25,30 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////...
[ "src/SFML/Network/IpAddress.cpp" ]
[ { "comment": "`Any` is no longer a type. Does this change anything about the code?", "path": "src/SFML/Network/IpAddress.cpp", "hunk": "@@ -25,121 +25,267 @@\n ////////////////////////////////////////////////////////////\n // Headers\n ////////////////////////////////////////////////////////////\n+// Mi...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Kind of violates the `camelCase` naming. Do we care or not?
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/include/SFML/Network/Dns.hpp b/include/SFML/Network/Dns.hpp new file mode 100644 index 0000000000..faeb04df59 --- /dev/null +++ b/include/SFML/Network/Dns.hpp @@ -0,0 +1,214 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) ...
[ "include/SFML/Network/Dns.hpp" ]
[ { "comment": "Kind of violates the `camelCase` naming. Do we care or not?", "path": "include/SFML/Network/Dns.hpp", "hunk": "@@ -0,0 +1,213 @@\n+////////////////////////////////////////////////////////////\n+//\n+// SFML - Simple and Fast Multimedia Library\n+// Copyright (C) 2007-2025 Laurent Gomila (l...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion const auto records = sf::Dns::queryTxt("test-txt-long.sfml-dev.org"); ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "```suggestion\n const auto records = sf::Dns::queryTxt(\"test-txt-long.sfml-dev.org\");\n```", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+usin...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "```suggestion\n \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\");\n```", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion SECTION("test-txt-long.sfml-dev.org") ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "```suggestion\n SECTION(\"test-txt-long.sfml-dev.org\")\n```", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+using namespace std::string_literals;\n+...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion SECTION("test-txt-short.sfml-dev.org") ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "```suggestion\n SECTION(\"test-txt-short.sfml-dev.org\")\n```", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+using namespace std::string_literals;\n...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
```suggestion const auto records = sf::Dns::queryTxt("test-txt-short.sfml-dev.org"); ```
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "```suggestion\n const auto records = sf::Dns::queryTxt(\"test-txt-short.sfml-dev.org\");\n```", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+usi...
true
SFML/SFML
3,667
comment_to_fix
Add support for IPv6 and more types of DNS queries
Alternatively, I've setup IRC service records: `_irc._tcp.sfml-dev.org` & `_ircs._tcp.sfml-dev.org`
107f0cd85eea1bb84cf92b70b4b2416e9e134b07
c00649ef1d7d9253558ee7a4f7c38764f20deb10
diff --git a/test/Network/Dns.test.cpp b/test/Network/Dns.test.cpp new file mode 100644 index 0000000000..7cafd1ca73 --- /dev/null +++ b/test/Network/Dns.test.cpp @@ -0,0 +1,250 @@ +#include <SFML/Network/Dns.hpp> + +#include <catch2/catch_test_macros.hpp> + +#include <NetworkUtil.hpp> + +using namespace std::string_li...
[ "test/Network/Dns.test.cpp" ]
[ { "comment": "Alternatively, I've setup IRC service records:\n\n`_irc._tcp.sfml-dev.org` & `_ircs._tcp.sfml-dev.org`", "path": "test/Network/Dns.test.cpp", "hunk": "@@ -0,0 +1,233 @@\n+#include <SFML/Network/Dns.hpp>\n+\n+#include <catch2/catch_test_macros.hpp>\n+\n+#include <NetworkUtil.hpp>\n+\n+using...
true
SFML/SFML
3,429
issue_to_patch
Add a CMake option to disable internet tests
* The `getLocalAddress` test requires a functional network connection or it will fail. * The `getPublicAddress` test attempts to access the internet. Although it has a fallback, Debian (and probably other distros) doesn't allow any package builds to use the internet in their tests so it would be nice to have an option...
91327373b09abf5b32cf55b2fe101e118c38cb48
7c40d8ed9d5b65af62d5a35362d91693fdf4e024
[ "test/Network/IpAddress.test.cpp" ]
[]
diff --git a/test/Network/IpAddress.test.cpp b/test/Network/IpAddress.test.cpp index e4bdaf8185..e22f191b8a 100644 --- a/test/Network/IpAddress.test.cpp +++ b/test/Network/IpAddress.test.cpp @@ -71,15 +71,19 @@ TEST_CASE("[Network] sf::IpAddress") SECTION("Static functions") { - SECTION("getLocalAddr...
true
SFML/SFML
3,678
issue_to_patch
Replace old attribute syntax with new attribute syntax
Title. C++11 provided us with a standardized way to specify attributes. We already use this where we mark symbols as deprecated and everywhere where `[[nodiscard]]` is present. This change migrates `SFML_API_EXPORT` and `SFML_API_IMPORT` for non-Windows platforms to the new syntax. This change also reveals a few ...
51196acddb879ee1a276ba1a39c1fec590114abf
0a1554e15eeebe2ae061e0a9efc61590fcdfe9eb
diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 8004df4714..09e7b3ab8c 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -150,8 +150,8 @@ #else // Linux, FreeBSD, macOS -#define SFML_API_EXPORT __attribute__((__visibility__("default"))) -#define SFML_API_IMPORT __attribute_...
[ "include/SFML/Config.hpp", "include/SFML/Graphics/Glsl.inl", "include/SFML/Network/IpAddress.hpp", "include/SFML/System/Sleep.hpp", "include/SFML/System/String.hpp" ]
[]
true
SFML/SFML
3,448
issue_to_patch
Fix contentSizeToWindowSize for windows with a menu or an extended style and add test case for it
This builds upon the tests from #3444 . Currently there are a few failures, because both a Windows' 'ex-' style is not taken into account, and the possibility that the Window can have a menu bar is not taken into account. Current test output: ``` Randomness seeded to: 4046885590 Failed to open the Win32 clipb...
3528fcb293e37784f622edbe11a2dcee20814b40
029200b1957d0700b1dde4826bd4868132d2ac5f
diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 889c0c2fdc..22d5a529bf 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -579,9 +579,13 @@ void WindowImplWin32::grabCursor(bool grabbed) ////////////////////...
[ "src/SFML/Window/Win32/WindowImplWin32.cpp", "test/Window/WindowHandleWin32.test.cpp" ]
[ { "comment": "I tried passing an enum instead of the types here, but that didn't really compile so now I just used these dummy structs.", "path": "test/Window/WindowHandleWin32.test.cpp", "hunk": "@@ -36,26 +37,84 @@ LRESULT WINAPI wndProc(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)\n }...
diff --git a/test/Window/WindowHandleWin32.test.cpp b/test/Window/WindowHandleWin32.test.cpp index 89f046c833..320894d960 100644 --- a/test/Window/WindowHandleWin32.test.cpp +++ b/test/Window/WindowHandleWin32.test.cpp @@ -5,6 +5,7 @@ #include <SFML/Window/WindowBase.hpp> #include <catch2/catch_test_macros.hpp> +#i...
true
SFML/SFML
3,448
comment_to_fix
Fix contentSizeToWindowSize for windows with a menu or an extended style and add test case for it
I tried passing an enum instead of the types here, but that didn't really compile so now I just used these dummy structs.
3528fcb293e37784f622edbe11a2dcee20814b40
029200b1957d0700b1dde4826bd4868132d2ac5f
diff --git a/test/Window/WindowHandleWin32.test.cpp b/test/Window/WindowHandleWin32.test.cpp index 89f046c833..320894d960 100644 --- a/test/Window/WindowHandleWin32.test.cpp +++ b/test/Window/WindowHandleWin32.test.cpp @@ -5,6 +5,7 @@ #include <SFML/Window/WindowBase.hpp> #include <catch2/catch_test_macros.hpp> +#i...
[ "test/Window/WindowHandleWin32.test.cpp" ]
[ { "comment": "I tried passing an enum instead of the types here, but that didn't really compile so now I just used these dummy structs.", "path": "test/Window/WindowHandleWin32.test.cpp", "hunk": "@@ -36,26 +37,84 @@ LRESULT WINAPI wndProc(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)\n }...
true
SFML/SFML
3,422
issue_to_patch
Fix opening `sf::Font` from non-ASCII path
## Description Related to https://github.com/SFML/SFML/issues/3406 This PR is more complicated than most Unicode support PRs because we have to create a stream that remains alive for the lifetime of the `sf::Font` object. Most code is factored out into an `openFromStreamImpl` function that all 3 opening functions...
2241bee942644a3ab4861806375f9ed849ce9e50
3391f934615fdfd505b584556582fd4b23bbb7fe
diff --git a/include/SFML/Graphics/Font.hpp b/include/SFML/Graphics/Font.hpp index 30e1576aa4..d1a0140116 100644 --- a/include/SFML/Graphics/Font.hpp +++ b/include/SFML/Graphics/Font.hpp @@ -38,6 +38,7 @@ #include <filesystem> #include <memory> #include <string> +#include <string_view> #include <unordered_map> #in...
[ "include/SFML/Graphics/Font.hpp", "src/SFML/Graphics/Font.cpp", "test/Graphics/Font.test.cpp", "test/Graphics/tuffy-ń.ttf", "test/Graphics/tuffy-🐌.ttf" ]
[ { "comment": "```suggestion\r\n err() << \"Failed to load font from memory (provided data pointer is nullptr)\" << std::endl;\r\n```", "path": "src/SFML/Graphics/Font.cpp", "hunk": "@@ -211,122 +192,38 @@ bool Font::openFromMemory(const void* data, std::size_t sizeInBytes)\n // Cleanup the pr...
diff --git a/test/Graphics/Font.test.cpp b/test/Graphics/Font.test.cpp index c605ae0e7c..271a1fad4f 100644 --- a/test/Graphics/Font.test.cpp +++ b/test/Graphics/Font.test.cpp @@ -7,10 +7,10 @@ #include <SFML/System/FileInputStream.hpp> #include <catch2/catch_test_macros.hpp> +#include <catch2/generators/catch_gener...
true
SFML/SFML
3,422
comment_to_fix
Fix opening `sf::Font` from non-ASCII path
```suggestion err() << "Failed to load font from memory (provided data pointer is nullptr)" << std::endl; ```
2241bee942644a3ab4861806375f9ed849ce9e50
3391f934615fdfd505b584556582fd4b23bbb7fe
diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index 71ef0be442..9d553aa839 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -33,7 +33,8 @@ #endif #include <SFML/System/Err.hpp> #include <SFML/System/Exception.hpp> -#include <SFML/System/InputStream.hpp> +#include <SF...
[ "src/SFML/Graphics/Font.cpp" ]
[ { "comment": "```suggestion\r\n err() << \"Failed to load font from memory (provided data pointer is nullptr)\" << std::endl;\r\n```", "path": "src/SFML/Graphics/Font.cpp", "hunk": "@@ -211,122 +192,38 @@ bool Font::openFromMemory(const void* data, std::size_t sizeInBytes)\n // Cleanup the pr...
true
SFML/SFML
3,422
comment_to_fix
Fix opening `sf::Font` from non-ASCII path
```suggestion const auto memoryStream = std::make_shared<MemoryInputStream>(data, sizeInBytes); ```
2241bee942644a3ab4861806375f9ed849ce9e50
3391f934615fdfd505b584556582fd4b23bbb7fe
diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index 71ef0be442..9d553aa839 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -33,7 +33,8 @@ #endif #include <SFML/System/Err.hpp> #include <SFML/System/Exception.hpp> -#include <SFML/System/InputStream.hpp> +#include <SF...
[ "src/SFML/Graphics/Font.cpp" ]
[ { "comment": "```suggestion\r\n const auto memoryStream = std::make_shared<MemoryInputStream>(data, sizeInBytes);\r\n```", "path": "src/SFML/Graphics/Font.cpp", "hunk": "@@ -211,122 +192,38 @@ bool Font::openFromMemory(const void* data, std::size_t sizeInBytes)\n // Cleanup the previous resources...
true
SFML/SFML
3,664
issue_to_patch
SFML 3: Static libraries on Android ### Prerequisite Checklist - [x] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates - [x] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fen.sfml-dev.org) to prev...
Support static libraries on android
Fixes #3533 The main change here is to remove the egl context initialisation from the Main activity creation so that it's consistent with other platforms and happens during SFML's window creation. I'm not entirely sure what the use-case would be for that, perhaps it allowed people to use SFML to hook into a native ...
4d06ccb1e9f2778d3c024b0208844bd92a393f89
6fb1b58a54e22a5a62ca25c4e8e66b9060f1fa0c
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9260eca064..87eca2345a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,11 +37,6 @@ include(cmake/Config.cmake) # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html include(GNUInstallDirs) -# disable static libraries on Android -if(SFML_OS_ANDROI...
[ "CMakeLists.txt", "src/SFML/Audio/CMakeLists.txt", "src/SFML/Graphics/CMakeLists.txt", "src/SFML/Main/CMakeLists.txt", "src/SFML/Main/MainAndroid.cpp", "src/SFML/Network/CMakeLists.txt", "src/SFML/System/Android/Activity.hpp", "src/SFML/Window/CMakeLists.txt", "src/SFML/Window/EglContext.cpp" ]
[ { "comment": "Is this necessary? From what I can tell, this refers to the `EglContext* context{};` in [src/SFML/System/Android/Activity.hpp](https://github.com/SFML/SFML/blob/51196acddb879ee1a276ba1a39c1fec590114abf/src/SFML/System/Android/Activity.hpp#L68C5-L68C27). The only place outside the window module whe...
true
SFML/SFML
3,668
issue_to_patch
Feature/backmerge
## Description Backmerge changes (including the 3.0.2 release) from the `3.0.x` branch to `master`. ## How to test this PR? CI should pass
f5e4f1639e2b4e4d2a08e9cf7e6e0cf0b3b9cbd3
e1612c2e74eff1c312236c3c073b0455c43ebcdf
diff --git a/changelog.md b/changelog.md index 1ad7b968f6..40301c3051 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,39 @@ # Changelog +## SFML 3.0.2 + +### General + +- Automatic release CI builds (#3538) +- Documentation improvements (#3547, 3548) +- GitHub Actions updates (#3517, #3536) +- CMake ...
[ "changelog.md", "cmake/SFMLConfig.cmake.in", "migration.md" ]
[]
true
SFML/SFML
3,666
issue_to_patch
Support Unicode 17.0 (update cpp-unicodelib and SheenBidi)
Sorry I had to rename the branch and #3653 got closed automatically =\ ## Description Update cpp-unicodelib and SheenBidi to support Unicode 17.0. ## Tasks - [ ] Tested on Linux - [x] Tested on Windows - [ ] Tested on macOS - [ ] Tested on iOS - [ ] Tested on Android Compile-tested only.
cfde06d0ad9df15a84963dbe03a1efe7a573b2c4
5c5efc9d2144fb1ed7903e1f20381bf2d756a524
diff --git a/extlibs/headers/cpp-unicodelib/unicodelib.h b/extlibs/headers/cpp-unicodelib/unicodelib.h index 8d25956904..841167f3f8 100644 --- a/extlibs/headers/cpp-unicodelib/unicodelib.h +++ b/extlibs/headers/cpp-unicodelib/unicodelib.h @@ -1,13 +1,14 @@ // // unicodelib.h // -// Copyright (c) 2020 Yuji Hirose. ...
[ "extlibs/headers/cpp-unicodelib/unicodelib.h", "extlibs/headers/cpp-unicodelib/unicodelib_encodings.h", "extlibs/headers/cpp-unicodelib/unicodelib_names.h", "src/SFML/Graphics/CMakeLists.txt", "src/SFML/Graphics/Text.cpp" ]
[]
true
SFML/SFML
3,665
issue_to_patch
Backspace '\b' not detected on Android ## Subject of the issue Backspace on Android not detected. TextEntered event still returns \0 even if backspace is pressed. ## Your environment Tested on both Android 8 and Android 12. SFML 2.5.1 - compiled for Android Used CMake, Ninja, Android NDK r16b, Android SDK 2...
Fix backspace TextEntered event for android
Fixes #2272 Per discussion on issue - There are no native TextEntered events on android, so we simulate them by handling key release events and calling `getUnicodeChar`, but as that understandably doesn't return anything for the backspace key, we simulate it ourselves
f3283d323a520934b6d0aa07deaeb15592fc901b
12effcf661f4204db9efcc2607e2ce5f22ea1dc4
diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index d258733e0e..f31a0921d0 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -831,6 +831,12 @@ char32_t WindowImplAndroid::getUnicode(AInputEvent* ...
[ "src/SFML/Window/Android/WindowImplAndroid.cpp" ]
[]
true
SFML/SFML
3,628
issue_to_patch
Make Unicode conversions more robust against invalid data
Title. These changes are intended to make Unicode (UTF-8/16) conversions more robust against invalid sequences. Previously, feeding the conversions invalid sequences could result in those bytes being copied 1:1 to the UTF-32 output without proper validation. This resulted in confusion when attempting to decode non-U...
e533db99c8a83a6b81c47105964e10cbab421a0d
f742bc09e0878e3d78dc0b1a0f7f7620c97595e1
diff --git a/examples/event_handling/EventHandling.cpp b/examples/event_handling/EventHandling.cpp index 8f63c470c9..f5f24bd913 100644 --- a/examples/event_handling/EventHandling.cpp +++ b/examples/event_handling/EventHandling.cpp @@ -67,12 +67,12 @@ class Application application.m_handlerText.setStrin...
[ "examples/event_handling/EventHandling.cpp", "include/SFML/System/String.hpp", "include/SFML/System/String.inl", "include/SFML/System/Utf.hpp", "include/SFML/System/Utf.inl", "src/SFML/System/String.cpp", "test/System/String.test.cpp", "test/System/Utf.test.cpp" ]
[]
diff --git a/test/System/String.test.cpp b/test/System/String.test.cpp index 421fd6675d..f4f36f8b06 100644 --- a/test/System/String.test.cpp +++ b/test/System/String.test.cpp @@ -10,6 +10,13 @@ #include <cassert> +// Allow testing deprecated functions +#ifdef _MSC_VER +#pragma warning(disable : 4996) +#else +#prag...
true
SFML/SFML
3,658
issue_to_patch
When backgrounding on android we still need to recreate the surface
Fixes an oversight from #3643 - Didn't spot that some of the window init code to create the surface was shared with the code that recreates the surface when you return from being backgrounded, so it results in a blank screen To test run any of the examples, background them and then return to the app To test the o...
f3283d323a520934b6d0aa07deaeb15592fc901b
2b54b495d39e2d28aaf72c428ea649873b8bdbcd
diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index 41007394a8..c7dbdd123e 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -347,8 +347,12 @@ void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window) // Update the activity states ...
[ "src/SFML/Main/MainAndroid.cpp", "src/SFML/Window/Android/WindowImplAndroid.cpp", "src/SFML/Window/Android/WindowImplAndroid.hpp" ]
[]
true
SFML/SFML
3,655
issue_to_patch
16KB page size for Android below NDK 28 ### Prerequisite Checklist - [x] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates - [x] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fen.sfml-dev.org) to ...
16 KB page sizes for Android
<!-- Thanks a lot for making a contribution to SFML! 🙂 Please make sure you are targetting the correct branch. No more features are planned for the 2.x branches! (See [the readme](https://github.com/SFML/SFML#state-of-development)) Before creating the pull request, we ask you to check the following boxes: (For ...
e533db99c8a83a6b81c47105964e10cbab421a0d
601998f88e2457e14eb0207bc76406eccb67777b
diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index ab7c27026a..9cd42b0aa0 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -222,6 +222,9 @@ macro(sfml_add_library module) # Always use position-independent code on Android, even when linking statically. # This is needed because all c+...
[ "cmake/Macros.cmake", "examples/android/app/src/main/jni/CMakeLists.txt" ]
[]
true
SFML/SFML
3,647
issue_to_patch
When using xcode discover tests before test to avoid running unsigned code
Currently building the unit tests with Xcode 15+ will fail, as catch_discover_tests tries to run the test as a post-build step which is before it's. been codesigned, see https://gitlab.kitware.com/cmake/cmake/-/issues/21845 I can't explain why this works on the GitHub runners, as far as I can tell the commands are t...
c8d72318eb78bf4f2d82c78c1f66e232599aedee
1cd76c576af606573dbf9130256d3fb3ac16384e
diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index ab7c27026a..496dac41c5 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -435,7 +435,9 @@ function(sfml_add_test target SOURCES DEPENDS) endif() # Delay test registration when cross compiling to avoid running crosscompiled app on host OS -...
[ "cmake/Macros.cmake" ]
[]
true
SFML/SFML
3,656
issue_to_patch
SFML_ROOT on iOS does not work properly ### Prerequisite Checklist - [X] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates - [X] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fen.sfml-dev.org) to ...
Fix cmake finding SFML static libs package via SFML_DIR
Fixes #3360 , although this is a problem on any platform using static libs and specifying SFML_DIR, demonstrated by this CI run with only the test added: https://github.com/JonnyPtn/SFML/actions/runs/21553690518/job/62106372243 I don't agree with the suggestion on that issue that we should discourage people from usi...
e533db99c8a83a6b81c47105964e10cbab421a0d
0893510a7f0c67f0ce5511d9a4807f5ca6ef15a0
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c44fe0b89..a3d9273e08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -242,10 +242,16 @@ jobs: allow-empty: true base-path: ${{ github.workspace }} - - name: Test Install Interface + - n...
[ ".github/workflows/build.yml", "src/SFML/Audio/Dependencies.cmake.in", "src/SFML/Graphics/Dependencies.cmake.in", "src/SFML/Network/Dependencies.cmake.in", "test/install/CMakeLists.txt" ]
[]
diff --git a/test/install/CMakeLists.txt b/test/install/CMakeLists.txt index 5093a4d4b9..6cff70a638 100644 --- a/test/install/CMakeLists.txt +++ b/test/install/CMakeLists.txt @@ -7,12 +7,6 @@ if(PROJECT_IS_TOP_LEVEL) set(SFML_STATIC_LIBRARIES ON) endif() - # cmake by default will only search inside t...
true
SFML/SFML
3,651
issue_to_patch
Error in compiling and calling static library under Windows ### Prerequisite Checklist - [X] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates - [X] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2F...
Fix static install package config - Export custom openAL module so it can be found properly
Fixes #3308 It's actually an issue on all platforms when installing static SFML libraries and trying to find them, and an oversight when we added the custom openAL find module to use imported targets As the imported targets aren't (and can't be) exported via SFML, we must export the custom find module and use th...
a6f3a67e157030dc909ffe3bcef7ef2d90890765
f23962bc5ec18f1375a5d1bbbf72f19e2d5d5965
diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 82ccfd79d8..2295a12638 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -442,4 +442,9 @@ function(sfml_export_targets) "${CMAKE_CURRENT_BINARY_DIR}/SFMLConfigVersion.cmake" DESTINATION ${config_package_location} ...
[ "cmake/Macros.cmake", "cmake/SFMLConfigDependencies.cmake.in" ]
[]
true
SFML/SFML
3,645
issue_to_patch
Backmerge 2.6.x into master
## Description Mainly importing the minimp3 to dr_mp3 change from #2995 ## Tasks - [ ] Tested on Linux - [X] Tested on Windows - [ ] Tested on macOS - [ ] Tested on iOS - [ ] Tested on Android ## How to test this PR? CI should succeed. Run the examples.
68f95b25748cf9b32e997c44bf8305885d2150e6
cba309d8bba0abf9b59ebd50beee186f99e66bd9
diff --git a/extlibs/headers/dr_mp3/dr_mp3.h b/extlibs/headers/dr_mp3/dr_mp3.h new file mode 100644 index 0000000000..e8833d136f --- /dev/null +++ b/extlibs/headers/dr_mp3/dr_mp3.h @@ -0,0 +1,5380 @@ +/* +MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. +dr_mp3 - v0.7...
[ "extlibs/headers/dr_mp3/dr_mp3.h", "extlibs/headers/minimp3/minimp3.h", "extlibs/headers/minimp3/minimp3_ex.h", "include/SFML/Audio/InputSoundFile.hpp", "readme.md", "src/SFML/Audio/CMakeLists.txt", "src/SFML/Audio/SoundFileReaderMp3.cpp", "src/SFML/Audio/SoundFileReaderMp3.hpp" ]
[]
true
SFML/SFML
3,194
issue_to_patch
Use imported target for openal to simplify copying dll's
One of the big problems people face (although now solved with openal Replaced for SFML3) is copying required dlls to the required location. A common and convenient way to do this is with the `TARGET_RUNTIME_DLLS` generator expression which works great for SFML dlls but not for openAL as it's not an imported target C...
a71b3a497be48316ab1ba8863f314ea018cb7674
3464e6d3984b3a173883494ba751e9f7f123d5f6
diff --git a/cmake/Modules/FindOpenAL.cmake b/cmake/Modules/FindOpenAL.cmake new file mode 100644 index 0000000000..7d1ccd5222 --- /dev/null +++ b/cmake/Modules/FindOpenAL.cmake @@ -0,0 +1,134 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/lic...
[ "cmake/Modules/FindOpenAL.cmake", "src/SFML/Audio/CMakeLists.txt" ]
[]
true
SFML/SFML
3,634
issue_to_patch
Android nullpointer dereference when getting finger position ## Subject of the issue When getting finger position on android the app sometimes crashes. ## Your environment * LineageOS 18.1, also reproduced on a Pixel_2_API_R AVD (the app was built on Arch Linux) * SFML master * clang version 14.0.6 from android...
Fix crash on android when requesting the position of a touch that isn't down, and deprecate fake "realtime" touch API
Fixes #2257 The issue was easily reproduced with any code that looks something like: ``` for(int i(0); i < 16; ++i) { if (sf::Touch::isDown(i)) { sf::Touch::getPosition(i); } } ``` The issue is both of those functions pump the event queue, so if the finger is released between them...
f5c2e80240a126577e549a9950ade14fa24a50ba
7a6c7661ac8d50e5354ecb8b0dee67c2dd3be4d0
diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index 538d19d1a4..f4d6ee4e67 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -299,11 +299,7 @@ int main() // We get the position of the mouse cursor (or touch), so that we can move the box accordingly ...
[ "examples/opengl/OpenGL.cpp", "examples/tennis/Tennis.cpp", "include/SFML/Window/Touch.hpp", "src/SFML/Window/Android/InputImpl.cpp" ]
[ { "comment": "This will mean touch input won't move the paddle on this example - I'd like to implement proper touch support for all examples at some point so have just left it out for now, but could add a new touch implementation using events for this PR if needed", "path": "examples/tennis/Tennis.cpp", ...
true
SFML/SFML
3,634
comment_to_fix
Fix crash on android when requesting the position of a touch that isn't down, and deprecate fake "realtime" touch API
This will mean touch input won't move the paddle on this example - I'd like to implement proper touch support for all examples at some point so have just left it out for now, but could add a new touch implementation using events for this PR if needed
f5c2e80240a126577e549a9950ade14fa24a50ba
7a6c7661ac8d50e5354ecb8b0dee67c2dd3be4d0
diff --git a/examples/tennis/Tennis.cpp b/examples/tennis/Tennis.cpp index a808597af3..7364887c83 100644 --- a/examples/tennis/Tennis.cpp +++ b/examples/tennis/Tennis.cpp @@ -173,13 +173,6 @@ int main() leftPaddle.move({0.f, paddleSpeed * deltaTime}); } - if (sf::Touch::isDown...
[ "examples/tennis/Tennis.cpp" ]
[ { "comment": "This will mean touch input won't move the paddle on this example - I'd like to implement proper touch support for all examples at some point so have just left it out for now, but could add a new touch implementation using events for this PR if needed", "path": "examples/tennis/Tennis.cpp", ...
true
SFML/SFML
3,634
comment_to_fix
Fix crash on android when requesting the position of a touch that isn't down, and deprecate fake "realtime" touch API
This wasn't working anyway, as it would return -1,-1 when the finger wasn't down so it's off screen. Also doesn't appear to render the cube correctly anyway, just some odd rendering artifacts - A problem for another day I think
f5c2e80240a126577e549a9950ade14fa24a50ba
7a6c7661ac8d50e5354ecb8b0dee67c2dd3be4d0
diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index 538d19d1a4..f4d6ee4e67 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -299,11 +299,7 @@ int main() // We get the position of the mouse cursor (or touch), so that we can move the box accordingly ...
[ "examples/opengl/OpenGL.cpp" ]
[ { "comment": "This wasn't working anyway, as it would return -1,-1 when the finger wasn't down so it's off screen. Also doesn't appear to render the cube correctly anyway, just some odd rendering artifacts - A problem for another day I think", "path": "examples/opengl/OpenGL.cpp", "hunk": "@@ -299,11 +2...
true
SFML/SFML
3,644
issue_to_patch
Remove redundant documentation comments in private implementation files
We only run doxygen over the public include folder, of which nothing is changed in this PR We have doxygen comments for all the private implementation methods, which is not only redundant as we don't produce any docs for them, but could be considered harmful: - Contributors must update them whenever they work on an...
1e5c42888f913851a2e3dcfb7189b407b141f4ba
1433fd41e1522c8ae8a0025c41e2baf4902d02c3
diff --git a/src/SFML/System/Android/ResourceStream.hpp b/src/SFML/System/Android/ResourceStream.hpp index e263cb807b..acb383cc22 100644 --- a/src/SFML/System/Android/ResourceStream.hpp +++ b/src/SFML/System/Android/ResourceStream.hpp @@ -46,11 +46,6 @@ namespace sf::priv class SFML_SYSTEM_API ResourceStream : public ...
[ "src/SFML/System/Android/ResourceStream.hpp", "src/SFML/System/Unix/SleepImpl.hpp", "src/SFML/System/Win32/SleepImpl.hpp", "src/SFML/Window/Android/ClipboardImpl.hpp", "src/SFML/Window/Android/CursorImpl.hpp", "src/SFML/Window/Android/JoystickImpl.hpp", "src/SFML/Window/Android/SensorImpl.hpp", "src/S...
[]
true
SFML/SFML
3,613
issue_to_patch
Android examples
Currently none of the examples work for Android, there's only a separate android example with lots of android specific code. This is a draft to add an android project to SFML which can build and run the shared examples easily. Examples supported (Parity with iOS): - Window - Event handling - OpenGL - Stencil ...
1e5c42888f913851a2e3dcfb7189b407b141f4ba
a0791573d1fc859261548f5c2a41eafacb1307b1
diff --git a/CMakeLists.txt b/CMakeLists.txt index caf3b42cea..9260eca064 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -389,7 +389,7 @@ endif() # add an option for building the examples sfml_set_option(SFML_BUILD_EXAMPLES OFF BOOL "ON to build the SFML examples, OFF to ignore them") -if(SFML_BUILD_EXAMPLES A...
[ "CMakeLists.txt", "cmake/Macros.cmake", "examples/CMakeLists.txt", "examples/projects/android/.gitignore", "examples/projects/android/SFML/build.gradle.kts", "examples/projects/android/SFML/src/main/AndroidManifest.xml", "examples/projects/android/build.gradle.kts", "examples/projects/android/events_e...
[ { "comment": "This is something every user would have to do, so perhaps it should be set as a public property on `SFML::Main` instead so they don't have to?", "path": "cmake/Macros.cmake", "hunk": "@@ -329,6 +329,11 @@ macro(sfml_add_example target)\n M...
true
SFML/SFML
3,613
comment_to_fix
Android examples
This is something every user would have to do, so perhaps it should be set as a public property on `SFML::Main` instead so they don't have to?
1e5c42888f913851a2e3dcfb7189b407b141f4ba
a0791573d1fc859261548f5c2a41eafacb1307b1
diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 880c0112c2..ab7c27026a 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -329,6 +329,10 @@ macro(sfml_add_example target) MACOSX_BUNDLE_INFO_PLIST ${INFO_PLIST} ...
[ "cmake/Macros.cmake" ]
[ { "comment": "This is something every user would have to do, so perhaps it should be set as a public property on `SFML::Main` instead so they don't have to?", "path": "cmake/Macros.cmake", "hunk": "@@ -329,6 +329,11 @@ macro(sfml_add_example target)\n M...
true
SFML/SFML
3,613
comment_to_fix
Android examples
I assume checking this in is required for the simpler setup?
1e5c42888f913851a2e3dcfb7189b407b141f4ba
a0791573d1fc859261548f5c2a41eafacb1307b1
diff --git a/examples/projects/android/gradle/wrapper/gradle-wrapper.jar b/examples/projects/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000..e708b1c023 Binary files /dev/null and b/examples/projects/android/gradle/wrapper/gradle-wrapper.jar differ
[ "examples/projects/android/gradle/wrapper/gradle-wrapper.jar" ]
[ { "comment": "I assume checking this in is required for the simpler setup?", "path": "examples/projects/android/gradle/wrapper/gradle-wrapper.jar", "hunk": "", "resolving_sha": "a0791573d1fc859261548f5c2a41eafacb1307b1", "resolving_diff": "diff --git a/examples/projects/android/gradle/wrapper/gr...
true
SFML/SFML
3,613
comment_to_fix
Android examples
Is `sourceSets` not needed here?
1e5c42888f913851a2e3dcfb7189b407b141f4ba
a0791573d1fc859261548f5c2a41eafacb1307b1
diff --git a/examples/projects/android/window_example/build.gradle.kts b/examples/projects/android/window_example/build.gradle.kts new file mode 100644 index 0000000000..491764dbf2 --- /dev/null +++ b/examples/projects/android/window_example/build.gradle.kts @@ -0,0 +1,22 @@ +plugins { + alias(libs.plugins.android.a...
[ "examples/projects/android/window_example/build.gradle.kts" ]
[ { "comment": "Is `sourceSets` not needed here?", "path": "examples/projects/android/window_example/build.gradle.kts", "hunk": "@@ -0,0 +1,22 @@\n+plugins {\n+ alias(libs.plugins.android.application)\n+ alias(libs.plugins.kotlin.android)\n+ alias(libs.plugins.kotlin.compose)\n+}\n+\n+android {\n...
true
SFML/SFML
3,613
comment_to_fix
Android examples
If one wanted to update this, where does one get it from?
1e5c42888f913851a2e3dcfb7189b407b141f4ba
a0791573d1fc859261548f5c2a41eafacb1307b1
diff --git a/examples/projects/android/gradlew.bat b/examples/projects/android/gradlew.bat new file mode 100644 index 0000000000..107acd32c4 --- /dev/null +++ b/examples/projects/android/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License...
[ "examples/projects/android/gradlew.bat" ]
[ { "comment": "If one wanted to update this, where does one get it from?", "path": "examples/projects/android/gradlew.bat", "hunk": "", "resolving_sha": "a0791573d1fc859261548f5c2a41eafacb1307b1", "resolving_diff": "diff --git a/examples/projects/android/gradlew.bat b/examples/projects/android/gr...
true
SFML/SFML
3,643
issue_to_patch
EGL context is not created on Android ### Prerequisite Checklist - [x] I searched for [existing issues](https://github.com/search?q=repo%3ASFML%2FSFML&type=issues) to prevent duplicates - [x] I searched for [existing discussions on the forum](https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fen.sfml-dev.org) to pr...
Block window creation on android until async process finishes
fixes #3521 Creating a window on android is an async process, and with the current implementation the native window is likely to not exist after you've created the `sf::Window` object so if you do anything with it before polling events it is likely to crash, this can be seen with the openGL example which will crash...
5e7f5c7e0534eef0f81f2da20b73ff939af078a5
8e24326f226aab44ab0675cb3da47e1e69fc196d
diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index 31c4157155..d258733e0e 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -64,24 +64,26 @@ WindowImplAndroid::WindowImplAndroid(VideoMode mode, ...
[ "src/SFML/Window/Android/WindowImplAndroid.cpp", "src/SFML/Window/Android/WindowImplAndroid.hpp", "src/SFML/Window/EglContext.cpp" ]
[]
true
SFML/SFML
3,623
issue_to_patch
Move vector function definitions to inline file so static_asserts are hit correctly
Some of the `Vector` methods only support floating types - while we have static asserts for them, they do not flag the issue as they are not instantiated, e.g. if you try and call `length` on a vector2i you will currently get a linker error like: `unresolved external symbol "public: int __cdecl sf::Vector2<int>::len...
ca65abe717cc731b5ee309d25c1291508e163795
30d6b34d174ca9cdcc602ce7f88fd68ceeef8ff8
diff --git a/include/SFML/System/Vector2.hpp b/include/SFML/System/Vector2.hpp index f71d41b6ca..929f83b948 100644 --- a/include/SFML/System/Vector2.hpp +++ b/include/SFML/System/Vector2.hpp @@ -24,10 +24,13 @@ #pragma once -#include <SFML/System/Export.hpp> - #include <SFML/System/Angle.hpp> +#include <type_tr...
[ "include/SFML/System/Vector2.hpp", "include/SFML/System/Vector2.inl", "include/SFML/System/Vector3.hpp", "include/SFML/System/Vector3.inl", "src/SFML/System/CMakeLists.txt", "src/SFML/System/Vector2.cpp", "src/SFML/System/Vector3.cpp" ]
[]
true
STranslate/STranslate
725
issue_to_patch
添加金山翻译与腾讯翻译内置插件
变更内容: - 新增金山翻译(内置)插件,图标改成紫色(更容易区分),作为独立翻译服务,保留金山词霸(内置)的字典定位 - 新增腾讯翻译(内置)插件,补充免费内置翻译服务 - 将两个插件加入解决方案和预装插件列表 验证: - dotnet build src/STranslate.slnx -c Release 通过(0 警告,0 错误)
3d70920ac28fc3229581b1c08aa50dba9597f087
899ed8ff8911cf21d680ac1c25304e37e6c8743f
diff --git a/src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/en.json b/src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/en.json new file mode 100644 index 00000000..cdec7d86 --- /dev/null +++ b/src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/en.json...
[ "src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/en.json", "src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/en.xaml", "src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltIn/Languages/ja.json", "src/Plugins/STranslate.Plugin.Translate.ICibaTranslateBuiltI...
[]
true
STranslate/STranslate
711
issue_to_patch
fix: localize OCR service notifications | 修复 "无法获取OCR服务" 提示的本地化
This PR localizes OCR, image translation, and image translation OCR service-missing notifications. 将 OCR 服务缺失时的提示文案改为国际化资源,不再在 MainWindowViewModel 中硬编码中文。 ## Changes - Replaced hardcoded Chinese notification titles/messages with _i18n.GetTranslation(...). 将硬编码中文通知标题和正文替换为 _i18n.GetTranslation(...) - Added lo...
aea9c6d1d7802559d6f21aecbf15dbd846ff8fa0
7a688ce281a8646c04e4749fe02f6128c479728e
diff --git a/src/STranslate/Languages/en.xaml b/src/STranslate/Languages/en.xaml index 34af79b5..eccaee78 100644 --- a/src/STranslate/Languages/en.xaml +++ b/src/STranslate/Languages/en.xaml @@ -1,793 +1,800 @@ -<ResourceDictionary - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="htt...
[ "src/STranslate/Languages/en.xaml", "src/STranslate/Languages/ja.xaml", "src/STranslate/Languages/ko.xaml", "src/STranslate/Languages/zh-cn.xaml", "src/STranslate/Languages/zh-tw.xaml", "src/STranslate/ViewModels/MainWindowViewModel.cs" ]
[]
true
STranslate/STranslate
707
issue_to_patch
fix: harden hold key registration | 修复热键绑定冲突检测
This PR fixes hotkey registration around incremental translation hold keys. 此 PR 修复增量翻译按住键相关的热键注册问题。 ## Changes - Replace string-based hold-key conflict detection with exact `Key` comparison. 将基于字符串 `Contains` 的按住键冲突检测,改为精确比较 `Key`。 - Fix false conflict cases such as `F1` incorrectly matching `Alt + F10`. 修...
0a74971337a4d0d49cbf9c50b27e375ec8c77bff
97f598244c0fa9dfabea21187df1a3b499b12f3f
diff --git a/src/STranslate/Helpers/HotkeyMapper.cs b/src/STranslate/Helpers/HotkeyMapper.cs index fe2f6b5f..bf350daa 100644 --- a/src/STranslate/Helpers/HotkeyMapper.cs +++ b/src/STranslate/Helpers/HotkeyMapper.cs @@ -25,6 +25,7 @@ public class HotkeyMapper private static UnhookWindowsHookExSafeHandle? _hookHan...
[ "src/STranslate/Helpers/HotkeyMapper.cs" ]
[]
true
STranslate/STranslate
704
issue_to_patch
修复音频停止死锁,改进金山翻译,添加乌兹别克语支持
## 修改内容 - 修复音频播放停止时可能触发的死锁/卡死问题 - 改进金山词霸内置翻译 - 添加乌兹别克语支持 ## 测试 - 本地构建通过 - 手动测试金山词霸内置翻译 - 手动测试乌兹别克语选项与翻译流程 - 音频播放与停止发生死锁(未知,没咋测试,死锁还没遇到)
95ca9a5c086cec4aca81bda1f604aeba4f016eda
84bc9bf1898f7024cb5c41d8502a8b6a655d6a4d
diff --git a/src/Plugins/STranslate.Plugin.Ocr.Baidu/Main.cs b/src/Plugins/STranslate.Plugin.Ocr.Baidu/Main.cs index 26c5c62f..4ca8b81a 100644 --- a/src/Plugins/STranslate.Plugin.Ocr.Baidu/Main.cs +++ b/src/Plugins/STranslate.Plugin.Ocr.Baidu/Main.cs @@ -204,6 +204,7 @@ public async Task<string> GetAccessTokenAsync(str...
[ "src/Plugins/STranslate.Plugin.Ocr.Baidu/Main.cs", "src/Plugins/STranslate.Plugin.Ocr.OpenAI/Main.cs", "src/Plugins/STranslate.Plugin.Translate.Baidu/Main.cs", "src/Plugins/STranslate.Plugin.Translate.BigModel/Main.cs", "src/Plugins/STranslate.Plugin.Translate.DeepL/Main.cs", "src/Plugins/STranslate.Plugi...
[]
true
STranslate/STranslate
673
issue_to_patch
修复内置插件-微软翻译无法翻译的问题
**先说代码主要变化:** 把原来的逆向得到的签名算法,换成了edge.microsoft.com获取token,再请求api-edge域名。 **主要更换原因:** 或许微软已经吊销/更换了之前逆向得到的私钥,反正在我这里最终结果是无法翻译。所以先换成这个大多数通用的形式。 **大概代码变更:** 1.把GetTargetLanguage方法里的“,”都换成了“,”。(我看了其他插件,好像都是中文逗号,但是我无法编译,索性只把这里的改了) 2.把旧接口都换成新接口,顺便也变更了名字。 3.把旧签名方法换成了新的获取Token并请求api的方法,同时删掉其旧的对应的使用。 **具体历程(可忽略):**...
d77bbc506e1a6e48608aafb3a01a0492b00babf1
9a54ad1ce6f6b6078b96ed174c35ddbe1f9cb186
diff --git a/src/Plugins/STranslate.Plugin.Translate.MicrosoftBuiltIn/Main.cs b/src/Plugins/STranslate.Plugin.Translate.MicrosoftBuiltIn/Main.cs index 7777f6ff..14017c1b 100644 --- a/src/Plugins/STranslate.Plugin.Translate.MicrosoftBuiltIn/Main.cs +++ b/src/Plugins/STranslate.Plugin.Translate.MicrosoftBuiltIn/Main.cs @...
[ "src/Plugins/STranslate.Plugin.Translate.MicrosoftBuiltIn/Main.cs" ]
[]
true
STranslate/STranslate
674
issue_to_patch
feat(http): add StreamPostAsyncEnumerable for IHttpService
#672
d77bbc506e1a6e48608aafb3a01a0492b00babf1
cf586a754ad1bcfbd60db5b1268ddbbc958d951c
diff --git a/src/STranslate.Plugin/IHttpService.cs b/src/STranslate.Plugin/IHttpService.cs index a23ef650..1cf1548d 100644 --- a/src/STranslate.Plugin/IHttpService.cs +++ b/src/STranslate.Plugin/IHttpService.cs @@ -181,6 +181,20 @@ public interface IHttpService /// <returns></returns> Task StreamPostAsync(str...
[ "src/STranslate.Plugin/IHttpService.cs", "src/STranslate/Core/HttpService.cs" ]
[]
true
STranslate/STranslate
671
issue_to_patch
Fix/hostkeyregistefailed
#661
c33feeeba8b6784bce0c4f27a1b0200f9a5353d0
390265e30f7b3512c038e1872757eb12e1a921e0
diff --git a/src/STranslate/App.xaml.cs b/src/STranslate/App.xaml.cs index 82669453..9ccbeba3 100644 --- a/src/STranslate/App.xaml.cs +++ b/src/STranslate/App.xaml.cs @@ -371,7 +371,9 @@ private static bool NeedAdmin() UACHelper.Create(); } - UACHelper.Run(mode); + ...
[ "src/STranslate/App.xaml.cs" ]
[]
true
STranslate/STranslate
665
issue_to_patch
update BigModel(z.ai) plugin name, icon and prompts
- zhipu API supports system role prompts [doc: cn](https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E5%AF%B9%E8%AF%9D%E8%A1%A5%E5%85%A8) [doc: global](https://docs.z.ai/api-reference/llm/chat-completion) - update name: 智谱清言 -> 智谱 - update logo <img width="241" height="49" alt="image" src="https://githu...
2ceaf6a3b2cfbe5fbd8d172bd1d59d41330dcc61
983ee9d5e7e182aedf33d9ac88512c0044356843
diff --git a/src/Plugins/STranslate.Plugin.Translate.BigModel/Languages/zh-cn.json b/src/Plugins/STranslate.Plugin.Translate.BigModel/Languages/zh-cn.json index b8c06cd6..20d7ca01 100644 --- a/src/Plugins/STranslate.Plugin.Translate.BigModel/Languages/zh-cn.json +++ b/src/Plugins/STranslate.Plugin.Translate.BigModel/La...
[ "src/Plugins/STranslate.Plugin.Translate.BigModel/Languages/zh-cn.json", "src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs", "src/Plugins/STranslate.Plugin.Translate.BigModel/ViewModel/SettingsViewModel.cs", "src/Plugins/STranslate.Plugin.Translate.BigModel/icon.png" ]
[]
true
STranslate/STranslate
644
issue_to_patch
[Feature request]: IPluginContext: 提供主题同步 API,使插件窗口自动跟随主程序主题 ### 相关问题 插件创建的自定义窗口(Window、Dialog 等)无法自动跟随 STranslate 主程序的主题切换。 无论主程序设置为暗色还是亮色模式,插件窗口始终显示为亮色(或固定主题),导致视觉风格严重不一致。 ### 描述你希望的解决方案 插件应能通过 IPluginContext 直接获取或应用主程序的当前主题,使自定义窗口与主程序保持实时一致的视觉风格。 ### 描述你所考虑的替代方案 ### 方案1:添加 `CurrentTheme` 属性 ```csharp public in...
feat: 添加 IPluginContext.ApplyTheme 方法使插件窗口可同步主程序主题
- 向IPluginContext接口添加ApplyTheme(Window window)方法。 - 使用 ThemeManager 在 PluginContext 类中实现 ApplyTheme - 允许插件将主应用主题应用到其自定义窗口 - 已在 自制的 DeepSeekMCP 插件中测试:创建配置对话框,切换主程序亮色/暗色模式,窗口主题均正确跟随。 - 检查了原有 GetPromptEditWindow 不受影响,无回归。 Closes #643 <img width="897" height="651" alt="暗色" src="https://github.com/user-attachments/ass...
4ba72649299206a66621a1d61a78b1aaa9bdcbb0
bfc95eb6ea97dbd3b22188e787288b20b0fd54e3
diff --git a/src/STranslate.Plugin/IPluginContext.cs b/src/STranslate.Plugin/IPluginContext.cs index 470d9f6b..7e198115 100644 --- a/src/STranslate.Plugin/IPluginContext.cs +++ b/src/STranslate.Plugin/IPluginContext.cs @@ -69,4 +69,10 @@ public interface IPluginContext : IDisposable /// </summary> /// <typepa...
[ "src/STranslate.Plugin/IPluginContext.cs", "src/STranslate/Core/PluginContext.cs" ]
[]
true
STranslate/STranslate
637
issue_to_patch
feat: 朗读按钮优化为播放/停止切换,支持TTS一键启停
优化TTS播放控制体验 将朗读按钮改造为播放/停止二态切换,点击即可启停TTS,无需依赖Escape热键,解决原Escape热键停止TTS时会同时关闭窗口的问题,避免操作中断,提升用户交互直观性,减少误操作,优化整体体验 相关问题 #553 中也有提到
6af65a37f1a75d9532671b971f4a139ae0a8286f
9b6a86806237b8e461f0304120d51789f9ee83ed
diff --git a/src/STranslate/App.xaml.cs b/src/STranslate/App.xaml.cs index d28621a6..d5cc54dc 100644 --- a/src/STranslate/App.xaml.cs +++ b/src/STranslate/App.xaml.cs @@ -185,6 +185,8 @@ protected override void OnStartup(StartupEventArgs e) // 注册编码提供程序以支持 GBK 等编码 Encoding.RegisterProvider(CodePagesEnc...
[ "src/STranslate/App.xaml.cs", "src/STranslate/Controls/InputControl.cs", "src/STranslate/Controls/InputControl.xaml", "src/STranslate/Controls/OutputControl.cs", "src/STranslate/Controls/OutputControl.xaml", "src/STranslate/Helpers/TextContextMenuFix.cs", "src/STranslate/Languages/en.xaml", "src/STran...
[]
true
STranslate/STranslate
636
issue_to_patch
fast: 添加历史记录批量删除与批量导出
#426
addfc1eb90e5cb92a3864b5545bb9925bcd22a33
75c51201f6d60e7dde92887891e669c2a7163b02
diff --git a/src/STranslate/Languages/en.xaml b/src/STranslate/Languages/en.xaml index 851e88b5..55a0edbc 100644 --- a/src/STranslate/Languages/en.xaml +++ b/src/STranslate/Languages/en.xaml @@ -258,6 +258,13 @@ <sys:String x:Key="Total">Total</sys:String> <sys:String x:Key="Item">item</sys:String> <sys:...
[ "src/STranslate/Languages/en.xaml", "src/STranslate/Languages/ja.xaml", "src/STranslate/Languages/ko.xaml", "src/STranslate/Languages/zh-cn.xaml", "src/STranslate/Languages/zh-tw.xaml", "src/STranslate/ViewModels/Pages/HistoryViewModel.cs", "src/STranslate/Views/Pages/HistoryPage.xaml" ]
[]
true
STranslate/STranslate
612
issue_to_patch
chore: disable CET compatibility to fix startup/build issues on older Windows
禁用CET保护,增强对旧版本windows系统的兼容性。 > .NET 9运行时默认启用了更严格的控制流执行技术(CET)保护机制 > 旧版本的Windows 10(特别是版本10.0.19041.2546及之前)存在与CET相关的实现缺陷 > 当应用程序尝试在这些旧系统上运行时,系统无法正确处理CET保护,导致启动失败 Microsoft 官方兼容性说明:[.NET 9 中 CET 支持的变更](https://learn.microsoft.com/zh-cn/dotnet/core/compatibility/interop/9.0/cet-support) 在win10 10944.2846上,禁用后程...
e67828d7011bde14680786bb550cb5309cb65a73
7886ff729b309690540c40edb12623245105c225
diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 50713af2..389cc451 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,6 +5,7 @@ <ImplicitUsings>enable</ImplicitUsings> <EnableWindowsTargeting>true</EnableWindowsTargeting> <RepositoryUrl>https...
[ "src/Directory.Build.props" ]
[]
true
STranslate/STranslate
570
issue_to_patch
feat(eudict): add "Save to Vocabulary with Note" feature
结合欧陆官方提供的笔记api配合生词本api实现添加生词时,同步添加翻译内容作为笔记 - Add new button in translation result area to save word with note - Translation result is automatically added as note to the vocabulary - Extend IVocabularyPlugin interface with SaveWithNoteAsync method - Support token validation and cancellation
46820c67c6a46edd495841326c483967c1734340
b19b3157904ef76802d8f09337fd03edcf7086d2
diff --git a/.gitignore b/.gitignore index bb718697..60bd1442 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ publish/ target/ # claude code -nul \ No newline at end of file +nul diff --git a/src/Plugins/STranslate.Plugin.Vocabulary.Eudict/Main.cs b/src/Plugins/STranslate.Plugin.Vocabulary.Eudict/Main.cs...
[ ".gitignore", "src/Plugins/STranslate.Plugin.Vocabulary.Eudict/Main.cs", "src/STranslate.Plugin/IVocabularyPlugin.cs", "src/STranslate/Controls/OutputControl.cs", "src/STranslate/Controls/OutputControl.xaml", "src/STranslate/Languages/en.xaml", "src/STranslate/Languages/zh-cn.xaml", "src/STranslate/La...
[ { "comment": "修改插件底层接口需要明确是否所有插件的实现都拥有该功能\r\n\r\n比如另外一个生词本插件 [Maimemo](https://github.com/STranslate/STranslate.Plugin.Vocabulary.Maimemo) 以及其他可以接入的生词本服务都有嘛", "path": "src/STranslate.Plugin/IVocabularyPlugin.cs", "hunk": "@@ -12,6 +12,14 @@ public interface IVocabularyPlugin : IPlugin\n /// <param n...
true
STranslate/STranslate
567
issue_to_patch
fix: 修正文本错误
3567d5301f4c1e6b850c1b955d3fae79e5aa9cea
d8a7a8a08470fcd4b4bead04041ce8d117dd1b89
diff --git a/src/STranslate/Languages/zh-cn.xaml b/src/STranslate/Languages/zh-cn.xaml index f1abaa0a..5c85d1c6 100644 --- a/src/STranslate/Languages/zh-cn.xaml +++ b/src/STranslate/Languages/zh-cn.xaml @@ -55,7 +55,7 @@ <sys:String x:Key="General_TranslateOnPaste">粘贴立即翻译</sys:String> <sys:String x:Key="Gener...
[ "src/STranslate/Languages/zh-cn.xaml" ]
[]
true
STranslate/STranslate
565
issue_to_patch
feat: 新增截图辅助线开关的配置
b3d56fb2e7b801a81c77c3a755d642ccf20896d7
fbfe3ec7d85ca7dacfb594f84217f4b425d3db44
diff --git a/src/STranslate/Core/Screenshot.cs b/src/STranslate/Core/Screenshot.cs index 9fcd6dd2..b639a616 100644 --- a/src/STranslate/Core/Screenshot.cs +++ b/src/STranslate/Core/Screenshot.cs @@ -5,11 +5,18 @@ namespace STranslate.Core; public class Screenshot : IScreenshot { + private readonly Settings _sett...
[ "src/STranslate/Core/Screenshot.cs", "src/STranslate/Core/Settings.cs", "src/STranslate/Languages/en.xaml", "src/STranslate/Languages/zh-cn.xaml", "src/STranslate/Languages/zh-tw.xaml", "src/STranslate/Views/Pages/GeneralPage.xaml" ]
[]
true
STranslate/STranslate
543
issue_to_patch
修正提示文本
7d4f46da845263ba69b21872313cab2761b9a134
70ae6fc83c35eaa90fdffca4892040e11a533f16
diff --git a/src/STranslate/Languages/zh-cn.xaml b/src/STranslate/Languages/zh-cn.xaml index fbc97157..518eef30 100644 --- a/src/STranslate/Languages/zh-cn.xaml +++ b/src/STranslate/Languages/zh-cn.xaml @@ -317,7 +317,7 @@ <!-- // Output Control // --> <sys:String x:Key="CopyAsPascalCase">复制成大驼峰</sys:Stri...
[ "src/STranslate/Languages/zh-cn.xaml" ]
[]
true
STranslate/STranslate
542
issue_to_patch
LLM翻译插件提示词配置选项默认中文
d0897bf9ccf750906ba991bbf5a044bf42fc91bc
131c30c4d868626a2068a86ef5139a9b3dcdd9a2
diff --git a/src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs b/src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs index d732df8d..36e506fe 100644 --- a/src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs +++ b/src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs @@ -22,7 +22,7 @@...
[ "src/Plugins/STranslate.Plugin.Translate.BigModel/Settings.cs", "src/Plugins/STranslate.Plugin.Translate.BigModel/plugin.json", "src/Plugins/STranslate.Plugin.Translate.OpenAI/Settings.cs", "src/Plugins/STranslate.Plugin.Translate.OpenAI/plugin.json", "src/STranslate/Languages/zh-cn.xaml" ]
[]
true
STranslate/STranslate
538
issue_to_patch
feat: add tray icon hide function #537
7636db6b6a09be6cd4311ed44600f535755ac16d
594917e5443a4af21543dc3e102c2bfbbcf0f6be
diff --git a/src/STranslate/Core/Settings.cs b/src/STranslate/Core/Settings.cs index 57be05b7..a3b6dc8b 100644 --- a/src/STranslate/Core/Settings.cs +++ b/src/STranslate/Core/Settings.cs @@ -40,6 +40,8 @@ public partial class Settings : ObservableObject [ObservableProperty] public partial bool IgnoreHotkeysOnFul...
[ "src/STranslate/Core/Settings.cs", "src/STranslate/Languages/en.xaml", "src/STranslate/Languages/zh-cn.xaml", "src/STranslate/Languages/zh-tw.xaml", "src/STranslate/Views/MainWindow.xaml", "src/STranslate/Views/Pages/GeneralPage.xaml" ]
[]
true
STranslate/STranslate
514
issue_to_patch
feat: 添加无污染剪贴板操作功能
参考[pot-app/Selection](https://github.com/pot-app/Selection), 新增 `ClipboardBackup` 类和相关方法,实现剪贴板内容的备份与恢复。修改获取选中文本的方法,使用非污染版本避免影响用户剪贴板内容。 主要包括: 1. 添加备份和恢复剪贴板内容的功能 2. 实现剪贴板序列号检测以判断内容是否变化 3. 提供非污染版本的文本获取方法 非常感谢作者贡献非常好用的翻译工具,STranslate性能和功能方面都十分强大,但是污染剪贴板是一个小小的瑕疵,于是自己贡献了一部分代码,希望对项目有所帮助。目前本地测试通过,如果代码规范和功能存在问题还请作者指点。 ...
166f9b5b2c8b8b52b88821c24ed1802149b6b6ef
b2d9d7203f06a7487b1fa37a393213efe52b4359
diff --git a/src/STranslate.Util/ClipboardUtil.cs b/src/STranslate.Util/ClipboardUtil.cs index 7a198698..53b67af9 100644 --- a/src/STranslate.Util/ClipboardUtil.cs +++ b/src/STranslate.Util/ClipboardUtil.cs @@ -1,4 +1,4 @@ -using System.ComponentModel; +using System.ComponentModel; using System.Runtime.InteropService...
[ "src/STranslate.Util/ClipboardUtil.cs", "src/STranslate/Helper/MouseHookHelper.cs", "src/STranslate/ViewModels/NotifyIconViewModel.cs" ]
[]
true
STranslate/STranslate
478
issue_to_patch
fix: glm cannot save the thinking mode configuration
#477
278cb8d063099a212f548ea4e3f18bfeed94d6af
ee0d693c11261f5f8f3b4024b16f6558d9431e65
diff --git a/src/STranslate/ViewModels/Preference/Translator/TranslatorChatglm.cs b/src/STranslate/ViewModels/Preference/Translator/TranslatorChatglm.cs index abfe900e..35bd6ec3 100644 --- a/src/STranslate/ViewModels/Preference/Translator/TranslatorChatglm.cs +++ b/src/STranslate/ViewModels/Preference/Translator/Transl...
[ "src/STranslate/ViewModels/Preference/Translator/TranslatorChatglm.cs" ]
[]
true
STranslate/STranslate
476
issue_to_patch
Fix: Repair domain prompt #475
5bf2ab93f706c18effc35bed062118cc3dcb11a0
6277d71692ab7908255b571e82e77d94ac8c58c9
diff --git a/src/STranslate/ViewModels/Preference/Translator/TranslatorQwenMt.cs b/src/STranslate/ViewModels/Preference/Translator/TranslatorQwenMt.cs index fdb5fd73..7ace9b77 100644 --- a/src/STranslate/ViewModels/Preference/Translator/TranslatorQwenMt.cs +++ b/src/STranslate/ViewModels/Preference/Translator/Translato...
[ "src/STranslate/ViewModels/Preference/Translator/TranslatorQwenMt.cs" ]
[]
true
STranslate/STranslate
474
issue_to_patch
fix: llm ocr image type request parameter matching error
#429
ffa16f59e0e3487b033aac7ca8b0cfcb8f6b2829
5b6730dea3b7b175cf985ebdef55f5e3de09004a
diff --git a/src/STranslate/ViewModels/Preference/OCR/GeminiOCR.cs b/src/STranslate/ViewModels/Preference/OCR/GeminiOCR.cs index d1119d1a..d8a06319 100644 --- a/src/STranslate/ViewModels/Preference/OCR/GeminiOCR.cs +++ b/src/STranslate/ViewModels/Preference/OCR/GeminiOCR.cs @@ -1,5 +1,6 @@ using Newtonsoft.Json; usin...
[ "src/STranslate/ViewModels/Preference/OCR/GeminiOCR.cs", "src/STranslate/ViewModels/Preference/OCR/OpenAIOCR.cs" ]
[]
true