24 Commits
main ... dev

Author SHA1 Message Date
6bfae5a14e Merge branch 'main' of https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1 2026-03-21 13:43:29 +02:00
4034cf243d FIX: glfw crash when closing the game 2026-03-21 13:43:28 +02:00
b6e7414f04 Merge pull request 'fix msvc build & mingw build' (#10) from evildebugger/minecraft-pe-0.6.1:main into main
Reviewed-on: Kolyah35/minecraft-pe-0.6.1#10
2026-03-21 12:48:51 +02:00
66hh
83f3284827 fix msvc build & mingw build
1. Include unified header files using lowercase filenames
2. Change special characters to escape sequences to solve encoding issues
2026-03-21 18:32:09 +08:00
3dab395af3 fix workflow and im done 2026-03-21 02:45:06 +03:00
011c8f7123 fix mingw build 2026-03-21 02:35:04 +03:00
f69c009da9 replace pwd with workspace 2026-03-21 01:38:17 +03:00
b66b4a2dc2 wtf im dumb 2026-03-21 01:35:40 +03:00
7037b2b5f2 create build dir 2026-03-21 01:33:57 +03:00
d54e39b332 -_- 2026-03-21 01:32:47 +03:00
f96ba8bb33 ubuntu 22.04 2026-03-21 01:31:42 +03:00
f0e1980f59 i dont like xwin anymore 2026-03-21 01:31:35 +03:00
52f607b126 Made some changes to the GUI scale slider.
Should be waaaaaaay better now
2026-03-20 23:20:37 +01:00
84a956531c and here 2026-03-21 00:56:21 +03:00
c4f5f22f24 disable module scan 2026-03-21 00:51:35 +03:00
7867aea042 bruh 2026-03-21 00:43:57 +03:00
a90e1463ee maybe try geode msvc sdk 2026-03-21 00:41:19 +03:00
59e820e27f setup ninja 2026-03-21 00:33:59 +03:00
1199f53632 -_- 2026-03-21 00:28:07 +03:00
dc0e2c192b oh i forgot headers 2026-03-21 00:23:56 +03:00
6ef9efa434 maybe ninja? 2026-03-21 00:17:53 +03:00
72e6537dc5 Merge remote-tracking branch 'refs/remotes/origin/main' 2026-03-21 00:15:24 +03:00
0e2e7694d3 oops 2026-03-21 00:12:51 +03:00
45f04ca07b readme fix 2026-03-20 23:08:24 +02:00
27 changed files with 684 additions and 661 deletions

17
.github/actions/setup-ninja/action.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Setup Ninja
description: Sets up Ninja
inputs:
host:
description: 'Host platform: win, mac or linux'
required: true
runs:
using: "composite"
steps:
- name: Setup
shell: bash
run: |
curl -L https://github.com/ninja-build/ninja/releases/latest/download/ninja-${{ inputs.host }}.zip -o ninja.zip
7z x ninja.zip -o"$GITHUB_WORKSPACE/ninja"
echo "$GITHUB_WORKSPACE/ninja" >> $GITHUB_PATH

View File

@@ -19,7 +19,7 @@ permissions:
jobs:
build-windows:
name: Windows Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
@@ -27,59 +27,19 @@ jobs:
- name: Setup caches
uses: ./.github/actions/setup-cache
with:
host: win
host: linux
target: win
- name: Download xwin
uses: robinraju/release-downloader@v1.10
- name: Setup Ninja
uses: ./.github/actions/setup-ninja
with:
repository: Jake-Shadle/xwin
latest: true
fileName: 'xwin-*-x86_64-unknown-linux-musl.tar.gz'
tarBall: false
zipBall: false
out-file-path: "epic-xwin"
host: linux
- name: Prepare xwin
- name: Download llvm-mingw
run: |
tar -xzf epic-xwin/xwin-*-x86_64-unknown-linux-musl.tar.gz -C epic-xwin
mv epic-xwin/xwin-*-x86_64-unknown-linux-musl/xwin ./xwin
./xwin --arch x86_64 --sdk-version 10.0.22621 --accept-license list
# this caches '.xwin-cache/**/*' but that's actually only gonna
# contain the manifest cuz we only ran `xwin list` so far
- name: Setup xwin Cache
id: xwin-cache
uses: actions/cache@v4
with:
path: .xwin-cache
key: xwin-win-v1-${{ hashFiles('.xwin-cache/**/*') }}
- name: Download clang-msvc-sdk toolchain
uses: actions/checkout@v4
with:
repository: 'Nemirtingas/clang-msvc-sdk'
path: toolchain
submodules: recursive
- name: Install Clang
run: |
sudo apt-get update
sudo apt-get install -y wget lsb-release software-properties-common gnupg
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21 all
- name: Add LLVM 21 to path
run: echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
- name: Verify LLVM
run: |
which clang-cl
which lld-link
clang-cl --version
lld-link --version
curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/20260311/llvm-mingw-20260311-msvcrt-ubuntu-22.04-x86_64.tar.xz -o llvm-mingw.tar.xz
tar -xf llvm-mingw.tar.xz
mv llvm-mingw-* llvm-mingw
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
@@ -88,26 +48,30 @@ jobs:
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
env:
SPLAT_DIR: ${{ github.workspace }}/.xwin-cache/splat
TOOLCHAIN: ${{ github.workspace }}/toolchain/clang-cl-msvc.cmake
HOST_ARCH: x86_64
run: |
cmake $GITHUB_WORKSPACE \
-G Ninja \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_C_COMPILER=$GITHUB_WORKSPACE/llvm-mingw/bin/x86_64-w64-mingw32-clang \
-DCMAKE_CXX_COMPILER=$GITHUB_WORKSPACE/llvm-mingw/bin/x86_64-w64-mingw32-clang++ \
-DCMAKE_RC_COMPILER=$GITHUB_WORKSPACE/llvm-mingw/bin/x86_64-w64-mingw32-windres \
-DALSOFT_BACKEND_PIPEWIRE=OFF \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $env:BUILD_TYPE --target MinecraftPE --parallel
run: cmake --build . --config $BUILD_TYPE --target MinecraftPE --parallel
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: mcpe-windows
path: |
${{github.workspace}}/build/${{ env.BUILD_TYPE }}/MinecraftPE.exe
${{github.workspace}}/build/${{ env.BUILD_TYPE }}/glfw3.dll
${{github.workspace}}/build/${{ env.BUILD_TYPE }}/libpng16.dll
${{github.workspace}}/build/${{ env.BUILD_TYPE }}/OpenAL32.dll
${{github.workspace}}/build/${{ env.BUILD_TYPE }}/z.dll
${{github.workspace}}/build/MinecraftPE.exe
${{github.workspace}}/build/glfw3.dll
${{github.workspace}}/build/libpng16.dll
${{github.workspace}}/build/OpenAL32.dll
${{github.workspace}}/build/z.dll
build-linux:
name: Linux Build

View File

@@ -28,7 +28,8 @@ if (${PLATFORM} STREQUAL "Desktop")
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(EXTRA_LIBS ws2_32)
include_directories(misc/windows)
set(EXTRA_LIBS ws2_32 winhttp)
elseif(UNIX)
find_library(pthread NAMES pthread)
set(EXTRA_LIBS pthread m)
@@ -100,6 +101,7 @@ CPMAddPackage(
"ALSOFT_TESTS OFF"
"ALSOFT_UTILS OFF"
"LIBTYPE ${AL_LIBTYPE}"
"ALSOFT_ENABLE_MODULES OFF"
)
# TODO: Clear this paths with *

View File

@@ -113,7 +113,7 @@ cmake --build .
$HOME/Android/Sdk/cmdline-tools/bin/sdkmanager
```
> [!NOTE]
> [!Note]
> `sdkmanager` expects the SDK to include a `cmdline-tools/latest/` folder.
> If you only have `cmdline-tools/bin`, create the required layout:
>
@@ -134,7 +134,7 @@ cmake --build .
sdkmanager --install "platform-tools" "platforms;android-35" "build-tools;35.0.0"
```
> [!NOTE]
> [!Note]
> if you want build.sh to always find the SDK,
> Set ANDROID_SDK_ROOT in your shell config (~/.bashrc / ~/.profile / ~/.config/fish/config.fish), for example:
>
@@ -162,14 +162,14 @@ cmake --build .
7. Extract the archive to `/home/username/`, so that the final directory path is `/home/username/android-ndk-r14b/`
> [!WARNING]
> [!Warning]
> Make sure you dont end up with a nested folder like `/home/username/android-ndk-r14b/android-ndk-r14b/`.
8. Re run `build.sh`
## Web
1. Download and install **emsdk**: https://emscripten.org/docs/getting_started/downloads.html
> [!NOTE]
> [!Note]
> On arch linux you can use AUR:
> `yay -Sy emsdk`
@@ -179,7 +179,7 @@ cmake --build .
cmake .. -B . -G Ninja "-DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
cmake --build . --target MinecraftPE
```
> [!NOTE]
> [!Note]
> If you are using VSCode with CMake plugin, you can add Emscripten kit
> 1. Press Ctrl + Shift + P
> 2. Type `CMake: Edit User-Local CMake Kits` and hit Enter

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -182,9 +182,10 @@ options.graphics.fast=Fast
options.guiScale=GUI Scale
options.guiScale.auto=Auto
options.guiScale.small=Small
options.guiScale.normal=Normal
options.guiScale.medium=Medium
options.guiScale.large=Large
options.guiScale.larger=Larger
options.guiScale.largest=Largest
options.advancedOpengl=Advanced OpenGL
options.renderClouds=Clouds
options.farWarning1=A 64 bit Java installation is recommended

View File

@@ -168,9 +168,10 @@ options.graphics.fast=Fast
options.guiScale=GUI Scale
options.guiScale.auto=Auto
options.guiScale.small=Small
options.guiScale.normal=Normal
options.guiScale.medium=Medium
options.guiScale.large=Large
options.guiScale.larger=Larger
options.guiScale.largest=Largest
options.advancedOpengl=Advanced OpenGL
options.renderClouds=Clouds
options.farWarning1=A 64 bit Java installation is recommended

View File

@@ -168,8 +168,10 @@ options.graphics.fast=Fast
options.guiScale=GUI Scale
options.guiScale.auto=Auto
options.guiScale.small=Small
options.guiScale.normal=Normal
options.guiScale.medium=Medium
options.guiScale.large=Large
options.guiScale.larger=Larger
options.guiScale.largest=Largest
options.advancedOpengl=Advanced OpenGL
options.renderClouds=Clouds
options.farWarning1=A 64 bit Java installation is recommended

View File

@@ -1,8 +1,8 @@
#if defined(X360__)
#elif defined (_WIN32)
#include <WinSock2.h>
#include <winsock2.h>
#include <windows.h>
#include <Ws2tcpip.h>
#include <ws2tcpip.h>
// Must always include Winsock2.h before windows.h
// or else:

View File

@@ -109,7 +109,7 @@ public:
virtual bool supportsTouchscreen() override { return true; }
virtual void hideCursor(bool hide) {
virtual void hideCursor(bool hide) override {
int isHide = hide ? GLFW_CURSOR_NORMAL : GLFW_CURSOR_HIDDEN;
glfwSetInputMode(window, GLFW_CURSOR, isHide);
}

View File

@@ -1160,12 +1160,13 @@ void Minecraft::setSize(int w, int h) {
// determine gui scale, optionally overriding auto
if (guiScale != 0) {
// manual selection: 1->small, 2->normal, 3->large, 4->larger
// manual selection: 1->small, 2->medium, 3->large, 4->larger, 5->largest
switch (guiScale) {
case 1: Gui::GuiScale = 2.0f; break;
case 2: Gui::GuiScale = 3.0f; break;
case 3: Gui::GuiScale = 4.0f; break;
case 4: Gui::GuiScale = 5.0f; break; // bigger than large
case 4: Gui::GuiScale = 5.0f; break;
case 5: Gui::GuiScale = 6.0f; break;
default: Gui::GuiScale = 1.0f; break; // auto
}
} else {

View File

@@ -4,10 +4,11 @@
#include <errno.h>
#include <platform/log.h>
#if !defined(_WIN32)
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#if defined(_WIN32)
#include <direct.h>
#else
#include <sys/stat.h>
#include <sys/types.h>
#endif
OptionsFile::OptionsFile() {
@@ -27,39 +28,44 @@ void OptionsFile::setOptionsPath(const std::string& path) {
std::string OptionsFile::getOptionsPath() const {
return settingsPath;
}
void OptionsFile::save(const StringVector& settings) {
FILE* pFile = fopen(settingsPath.c_str(), "w");
if(pFile != NULL) {
for(StringVector::const_iterator it = settings.begin(); it != settings.end(); ++it) {
fprintf(pFile, "%s\n", it->c_str());
}
fclose(pFile);
} else {
if (errno != ENOENT)
LOGI("OptionsFile::save failed to open '%s' for writing: %s", settingsPath.c_str(), strerror(errno));
FILE* pFile = fopen(settingsPath.c_str(), "w");
// Ensure parent directory exists for safekeeping if path contains directories
std::string dir = settingsPath;
size_t fpos = dir.find_last_of("/\\");
if (fpos != std::string::npos) {
dir.resize(fpos);
struct stat st;
if (stat(dir.c_str(), &st) != 0) {
// attempt recursive mkdir
std::string toCreate;
for (size_t i = 0; i <= dir.size(); ++i) {
if (i == dir.size() || dir[i] == '/' || dir[i] == '\\') {
if (!toCreate.empty()) {
mkdir(toCreate.c_str(), 0755);
}
}
if (i < dir.size())
toCreate.push_back(dir[i]);
}
}
}
}
if (!pFile && errno == ENOENT) {
std::string dir = settingsPath;
size_t fpos = dir.find_last_of("/\\");
if (fpos != std::string::npos) {
dir.resize(fpos);
std::string toCreate;
for (size_t i = 0; i <= dir.size(); ++i) {
if (i == dir.size() || dir[i] == '/' || dir[i] == '\\') {
if (!toCreate.empty()) {
#if defined(_WIN32)
_mkdir(toCreate.c_str());
#else
mkdir(toCreate.c_str(), 0755);
#endif
}
}
if (i < dir.size())
toCreate.push_back(dir[i]);
}
}
pFile = fopen(settingsPath.c_str(), "w");
}
if (!pFile) {
LOGI("OptionsFile::save failed: %s", strerror(errno));
return;
}
for (const auto& s : settings) {
fprintf(pFile, "%s\n", s.c_str());
}
fclose(pFile);
}

View File

@@ -186,7 +186,7 @@ void Font::draw( const std::string& str, float x, float y, int color, bool darke
glPushMatrix2();
glTranslatef2((GLfloat)x, (GLfloat)y, 0.0f);
for (unsigned int i = 0; i < str.length(); i++) {
while (str.length() > i + 1 && str[i] == '§') {
while (str.length() > i + 1 && str[i] == '\xa7') {
int cc = hex.find((char)tolower(str[i + 1]));
if (cc < 0 || cc > 15) cc = 15;
lists[index++] = listPos + 256 + cc + (darken ? 16 : 0);
@@ -235,7 +235,7 @@ int Font::width( const std::string& str )
int len = 0;
for (unsigned int i = 0; i < str.length(); i++) {
if (str[i] == '§') {
if (str[i] == '\xa7') {
i++;
} else {
//int ch = SharedConstants.acceptableLetters.indexOf(str.charAt(i));
@@ -274,7 +274,7 @@ std::string Font::sanitize( const std::string& str )
int j = 0;
for (unsigned int i = 0; i < str.length(); i++) {
if (str[i] == '§') {
if (str[i] == '\xa7') {
i++;
//} else if (SharedConstants.acceptableLetters.indexOf(str.charAt(i)) >= 0) {
} else {

View File

@@ -65,7 +65,7 @@ void OptionsGroup::createToggle(OptionId optId, Minecraft* minecraft ) {
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(itemLabel, element);
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
@@ -77,7 +77,7 @@ void OptionsGroup::createProgressSlider(OptionId optId, Minecraft* minecraft ) {
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(itemLabel, element);
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
@@ -87,7 +87,7 @@ void OptionsGroup::createStepSlider(OptionId optId, Minecraft* minecraft ) {
element->width = 100;
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(itemLabel, element);
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
@@ -98,7 +98,7 @@ void OptionsGroup::createTextbox(OptionId optId, Minecraft* minecraft) {
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(itemLabel, element);
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
@@ -109,7 +109,7 @@ void OptionsGroup::createKey(OptionId optId, Minecraft* minecraft) {
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(itemLabel, element);
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}

View File

@@ -1,9 +1,11 @@
#include "OptionsItem.h"
#include "../../Minecraft.h"
#include "../../../locale/I18n.h"
#include "../../../util/Mth.h"
OptionsItem::OptionsItem( std::string label, GuiElement* element )
OptionsItem::OptionsItem( OptionId optionId, std::string label, GuiElement* element )
: GuiElementContainer(false, true, 0, 0, 24, 12),
label(label) {
m_optionId(optionId),
m_label(label) {
addChild(element);
}
@@ -19,6 +21,22 @@ void OptionsItem::setupPositions() {
void OptionsItem::render( Minecraft* minecraft, int xm, int ym ) {
int yOffset = (height - 8) / 2;
minecraft->font->draw(label, (float)x, (float)y + yOffset, 0x909090, false);
std::string text = m_label;
if (m_optionId == OPTIONS_GUI_SCALE) {
int value = minecraft->options.getIntValue(OPTIONS_GUI_SCALE);
std::string scaleText;
switch (value) {
case 0: scaleText = I18n::get("options.guiScale.auto"); break;
case 1: scaleText = I18n::get("options.guiScale.small"); break;
case 2: scaleText = I18n::get("options.guiScale.medium"); break;
case 3: scaleText = I18n::get("options.guiScale.large"); break;
case 4: scaleText = I18n::get("options.guiScale.larger"); break;
case 5: scaleText = I18n::get("options.guiScale.largest"); break;
default: scaleText = I18n::get("options.guiScale.auto"); break;
}
text += ": " + scaleText;
}
minecraft->font->draw(text, (float)x, (float)y + yOffset, 0x909090, false);
super::render(minecraft, xm, ym);
}

View File

@@ -15,12 +15,13 @@ class OptionsItem: public GuiElementContainer
{
typedef GuiElementContainer super;
public:
OptionsItem(std::string label, GuiElement* element);
OptionsItem(OptionId optionId, std::string label, GuiElement* element);
virtual void render(Minecraft* minecraft, int xm, int ym);
void setupPositions();
private:
std::string label;
OptionId m_optionId;
std::string m_label;
};
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsItem_H__*/

View File

@@ -2,6 +2,7 @@
#include "../../Minecraft.h"
#include "../../renderer/Textures.h"
#include "../Screen.h"
#include "../../../locale/I18n.h"
#include "../../../util/Mth.h"
#include <algorithm>
#include <assert.h>
@@ -21,7 +22,7 @@ void Slider::render( Minecraft* minecraft, int xm, int ym ) {
if (m_numSteps > 2) {
int stepDistance = barWidth / (m_numSteps-1);
for(int a = 0; a <= m_numSteps; ++a) {
for(int a = 0; a < m_numSteps; ++a) {
int renderSliderStepPosX = xSliderStart + a * stepDistance + 1;
fill(renderSliderStepPosX - 1, ySliderStart - 2, renderSliderStepPosX + 1, ySliderEnd + 2, 0xff606060);
}
@@ -64,15 +65,20 @@ SliderFloat::SliderFloat(Minecraft* minecraft, OptionId option)
SliderInt::SliderInt(Minecraft* minecraft, OptionId option)
: Slider(option), m_option(dynamic_cast<OptionInt*>(minecraft->options.getOpt(option)))
{
m_numSteps = m_option->getMax() - m_option->getMin();
m_numSteps = m_option->getMax() - m_option->getMin() + 1;
m_percentage = float(m_option->get() - m_option->getMin()) / (m_numSteps-1);
}
void SliderInt::render( Minecraft* minecraft, int xm, int ym ) {
Slider::render(minecraft, xm, ym);
}
void SliderInt::mouseReleased( Minecraft* minecraft, int x, int y, int buttonNum ) {
Slider::mouseReleased(minecraft, x, y, buttonNum);
if (pointInside(x, y)) {
int curStep = Mth::floor(m_percentage * (m_numSteps-1));
int curStep = int(m_percentage * (m_numSteps-1) + 0.5f);
curStep = Mth::clamp(curStep + m_option->getMin(), m_option->getMin(), m_option->getMax());
m_percentage = float(curStep - m_option->getMin()) / (m_numSteps-1);
minecraft->options.set(m_optId, curStep);

View File

@@ -38,6 +38,7 @@ class SliderInt : public Slider {
public:
SliderInt(Minecraft* minecraft, OptionId option);
virtual void render( Minecraft* minecraft, int xm, int ym ) override;
virtual void mouseReleased( Minecraft* minecraft, int x, int y, int buttonNum ) override;
protected:

View File

@@ -28,6 +28,7 @@
#if defined(_WIN32)
#include <direct.h>
#include <sys/stat.h>
#else
#include <sys/stat.h>
#include <sys/types.h>

View File

@@ -164,7 +164,7 @@ void TouchscreenInput_TestFps::onConfigChanged(const Config& c) {
float maxPixels = _minecraft->pixelCalc.millimetersToPixels(10);
// float btnSize = Mth::Min(18 * Gui::GuiScale, maxPixels);
float btnSize = pc.millimetersToPixels(100);
float btnSize = pc.millimetersToPixels(50);
_model.addArea(AREA_PAUSE, aPause = new RectangleArea(w - 4 - btnSize, 4, w - 4, 4 + btnSize));
_model.addArea(AREA_CHAT, aChat = new RectangleArea(w - 8 - btnSize * 2, 4, w - 8 - btnSize, 4 + btnSize));

View File

@@ -31,7 +31,7 @@
// #else
// // Uglyness to fix redeclaration issues
// #ifdef WIN32
// #include <WinSock2.h>
// #include <winsock2.h>
// #include <Windows.h>
// #endif
// #include <gl/glew.h>

View File

@@ -27,7 +27,7 @@
// #endif
#ifdef PLATFORM_DESKTOP
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
#include "main_glfw.h"
#endif

View File

@@ -205,16 +205,16 @@ int main(void) {
delete app;
appContext.platform->finish();
delete appContext.platform;
#ifndef STANDALONE_SERVER
// Exit.
glfwDestroyWindow(platform->window);
glfwTerminate();
#endif
appContext.platform->finish();
delete appContext.platform;
return 0;
}

View File

@@ -14,7 +14,7 @@
#include <windows.h>
#include <windowsx.h>
#include <WinSock2.h>
#include <winsock2.h>
#include <process.h>
#include "SharedConstants.h"

View File

@@ -5,7 +5,7 @@
#include <vector>
#ifdef WIN32
#include <WinSock2.h>
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>

View File

@@ -140,7 +140,9 @@ RakNet::TimeUS GetTimeUS_Windows( void )
#if _MSC_VER >= 1400 && defined (_M_X64)
GetProcessAffinityMask(mProc, (PDWORD_PTR)&mProcMask, (PDWORD_PTR)&mSysMask);
#else
#ifndef __MINGW32__
GetProcessAffinityMask(mProc, &mProcMask, &mSysMask);
#endif
#endif
mThread = GetCurrentThread();

View File

@@ -1,8 +1,8 @@
#if defined(X360__)
#elif defined (_WIN32)
#include <WinSock2.h>
#include <winsock2.h>
#include <windows.h>
#include <Ws2tcpip.h>
#include <ws2tcpip.h>
// Must always include Winsock2.h before windows.h
// or else: