Skip to content

Commit

Permalink
Bit of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
siboehm committed Jan 14, 2024
1 parent ac15e92 commit d3db18d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/SDL
Submodule SDL updated 2040 files
2 changes: 1 addition & 1 deletion lib/irrlichtmt
Submodule irrlichtmt updated 407 files
9 changes: 4 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,10 @@ list(SORT server_SRCS)

# Avoid source_group on broken CMake version.
# see issue #7074 #7075
# if (CMAKE_VERSION VERSION_GREATER 3.8.1)
# # source_group(TREE ${CMAKE_CURRENT_BINARY_DIR} PREFIX "ProtoBuf Source Files" FILES ${proto_targets})
# source_group(TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${client_SRCS})
# source_group(TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${server_SRCS})
# endif()
if (CMAKE_VERSION VERSION_GREATER 3.8.1)
source_group(TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${client_SRCS})
source_group(TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${server_SRCS})
endif()

include_directories(
${PROJECT_BINARY_DIR}
Expand Down
3 changes: 1 addition & 2 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1884,14 +1884,13 @@ float Client::getCurRate()
void Client::makeScreenshot()
{
irr::video::IVideoDriver *driver = m_rendering_engine->get_video_driver();
irr::video::IImage* raw_image;

irr::video::IImage* raw_image;
if(m_rendering_engine->headless){
raw_image = m_rendering_engine->get_screenshot();
} else {
raw_image = driver->createScreenShot();
}

if (!raw_image)
return;

Expand Down
1 change: 0 additions & 1 deletion src/client/inputhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "client/keys.h"
#include "util/numeric.h"
#include "inputhandler.h"
#include "gui/mainmenumanager.h"
Expand Down
2 changes: 0 additions & 2 deletions src/client/inputhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include "joystick_controller.h"
#include <list>
#include <zmqpp/zmqpp.hpp>
#include "keycode.h"
#include "log.h"
#include "renderingengine.h"

#ifdef HAVE_TOUCHSCREENGUI
Expand Down
3 changes: 0 additions & 3 deletions src/client/remoteinputhandler.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include "remoteinputhandler.h"
#include "IEventReceiver.h"
#include "client/keycode.h"
#include "client/keys.h"
#include "clientiface.h"
#include "hud.h"
#include "irr_v2d.h"
#include "remoteclient.capnp.h"
Expand Down
5 changes: 3 additions & 2 deletions src/client/remoteinputhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "inputhandler.h"
#include <capnp/message.h>
#include <capnp/serialize-packed.h>
#include <zmqpp/zmqpp.hpp>

class RemoteInputHandler : public InputHandler
{
Expand All @@ -13,7 +14,7 @@ class RemoteInputHandler : public InputHandler
m_context(),
m_socket(m_context, zmqpp::socket_type::reply), m_receiver(receiver)
{
infostream << "RemoteInputHandler: Binding to " << endpoint << std::endl;
infostream << "RemoteInputHandler: Binding to " << endpoint << '\n';
m_socket.bind(endpoint);
// wait for client
zmqpp::message message;
Expand All @@ -24,7 +25,7 @@ class RemoteInputHandler : public InputHandler
capnp::FlatArrayMessageReader reader(words);
Action::Reader action = reader.getRoot<Action>();
if (action.hasKeyEvents()){
throw std::runtime_error("INVALID HANDSHAKE: Got key events in handshake");
throw std::runtime_error("INVALID HANDSHAKE: Got key events in handshake, expected 'action.hasKeyEvents() == false'");
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/client/render/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "cmake_config.h"
#include "core.h"
#include "plain.h"
#include "client/shadows/dynamicshadowsrender.h"
Expand Down Expand Up @@ -94,4 +93,4 @@ video::IImage *RenderingCore::get_screenshot()
v2u32 RenderingCore::getVirtualSize() const
{
return virtual_size;
}
}
1 change: 0 additions & 1 deletion src/client/render/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "cmake_config.h"
#include "pipeline.h"
#include "client/client.h"
#include "client/hud.h"
Expand Down

0 comments on commit d3db18d

Please sign in to comment.