Skip to content

Merge master into develop #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference/changelog-r2025.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Webots R2025b
- Bug Fixes
- Fixed a bug preventing the `webots-controller` executable from running on arm-based mac devices ([#6806](https://github.com/cyberbotics/webots/pull/6806)).
- Fixed a bug causing Webots to crash when multiple sounds were used with a [Speaker](speaker.md) node ([#6843](https://github.com/cyberbotics/webots/pull/6843)).
- Fixed a bug causing the "Reload/Reset" buttons in the controller recompilation popup to not work on Windows ([#6844](https://github.com/cyberbotics/webots/pull/6844)).

## Webots R2025a
Released on January 31st, 2025.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#ifndef MAZE_DEFINITION_H
#define MAZE_DEFINITION_H

#include "boolean.h"
#include <stdbool.h>
#include "linked_list.h"
// enum
typedef enum { North, South, East, West, None } Orientation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "round_manager.h"

#include "boolean.h"
#include <stdbool.h>
#include "helper.h"

#include <math.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>

#include "boolean.h"
#include <stdbool.h>
#include "helper.h"
#include "parameters.h"
#include "texture_generator.h"
Expand Down
20 changes: 10 additions & 10 deletions src/controller/c/speaker.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@ static void speaker_write_request(WbDevice *d, WbRequest *r) {
request_write_char(r, 1);
else
request_write_char(r, 0);
}

request_write_int32(r, sound->upload_size);
if (sound->upload_size) {
/* Sound data available to stream, send it one time and discard it.
* Webots will cache the data inside the device.
*/
request_write_data(r, sound->upload_data, sound->upload_size);
free(sound->upload_data);
sound->upload_data = NULL;
sound->upload_size = 0;
request_write_int32(r, sound->upload_size);
if (sound->upload_size) {
/* Sound data available to stream, send it one time and discard it.
* Webots will cache the data inside the device.
*/
request_write_data(r, sound->upload_data, sound->upload_size);
free(sound->upload_data);
sound->upload_data = NULL;
sound->upload_size = 0;
}
}

sound->need_update = false;
Expand Down
15 changes: 10 additions & 5 deletions src/webots/editor/WbBuildEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "../../../include/controller/c/webots/utils/ansi_codes.h"

#include <QtGui/QAction>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QToolButton>

Expand Down Expand Up @@ -268,12 +269,16 @@ void WbBuildEditor::reloadMessageBoxIfNeeded() {
if (WbMessageBox::enabled()) {
QMessageBox messageBox(QMessageBox::Question, tr("Compilation successful"),
tr("Do you want to reset or reload the world?"), QMessageBox::Cancel, this);
messageBox.addButton(tr("Reload"), QMessageBox::AcceptRole);
messageBox.setDefaultButton(messageBox.addButton(tr("Reset"), QMessageBox::AcceptRole));
const int ret = messageBox.exec();
if (ret == 0)
const QPushButton *reloadButton = messageBox.addButton(tr("Reload"), QMessageBox::AcceptRole);
QPushButton *resetButton = messageBox.addButton(tr("Reset"), QMessageBox::AcceptRole);
messageBox.setDefaultButton(resetButton);

messageBox.exec();

const QAbstractButton *clickedButton = messageBox.clickedButton();
if (clickedButton == reloadButton)
emit reloadRequested();
else if (ret == 1)
else if (clickedButton == resetButton)
emit resetRequested();
}
} else
Expand Down
10 changes: 9 additions & 1 deletion src/webots/wren/WbWrenTextureOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,15 @@ WrTexture2d *WbWrenTextureOverlay::createIconTexture(QString filePath) {
return imageTexture;

QImageReader imageReader(filePath);
QImage image = imageReader.read().mirrored(false, true); // account for inverted Y axis in OpenGL
QImage image = imageReader.read();

// account for inverted Y axis in OpenGL
#ifdef _WIN32 // Windows builds against a newer version of Qt, which deprecates `mirrored`
image = image.flipped(Qt::Vertical);
#else
image = image.mirrored(false, true);
#endif

const bool isTranslucent = image.pixelFormat().alphaUsage() == QPixelFormat::UsesAlpha;

imageTexture = wr_texture_2d_new();
Expand Down
Loading