Skip to content

Commit

Permalink
Fix compilation errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
  • Loading branch information
audetto committed Dec 15, 2023
1 parent e189516 commit a2e888a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion source/frontends/common2/commonframe.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#include "linux/linuxframe.h"

#include "Common.h"
#include "Configuration/Config.h"
#include "speed.h"

#include "frontends/common2/speed.h"
#include <vector>
#include <string>

Expand Down
5 changes: 4 additions & 1 deletion source/frontends/libretro/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "frontends/libretro/rkeyboard.h"
#include "frontends/common2/utils.h"
#include "frontends/common2/ptreeregistry.h"
#include "frontends/common2/programoptions.h"

#include "Common.h"
#include "CardManager.h"
Expand Down Expand Up @@ -51,7 +52,9 @@ namespace ra2
myLoggerContext = std::make_shared<LoggerContext>(true);
myRegistry = CreateRetroRegistry();
myRegistryContext = std::make_shared<RegistryContext>(myRegistry);
myFrame = std::make_shared<ra2::RetroFrame>();

const common2::EmulatorOptions defaultOptions;
myFrame = std::make_shared<ra2::RetroFrame>(defaultOptions);

refreshVariables();

Expand Down
4 changes: 3 additions & 1 deletion source/frontends/libretro/retroframe.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "StdAfx.h"
#include "frontends/common2/commonframe.h"
#include "frontends/libretro/retroframe.h"
#include "frontends/libretro/environment.h"

Expand Down Expand Up @@ -77,7 +78,8 @@ namespace
namespace ra2
{

RetroFrame::RetroFrame()
RetroFrame::RetroFrame(const common2::EmulatorOptions & options)
: common2::CommonFrame(options)
{
}

Expand Down
2 changes: 1 addition & 1 deletion source/frontends/libretro/retroframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ra2
class RetroFrame : public virtual common2::CommonFrame, public common2::GNUFrame
{
public:
RetroFrame();
RetroFrame(const common2::EmulatorOptions & options);

void VideoPresentScreen() override;
void FrameRefreshStatus(int drawflags) override;
Expand Down
2 changes: 1 addition & 1 deletion source/frontends/ncurses/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace
const LoggerContext loggerContext(options.log);
const RegistryContext registryContet(CreateFileRegistry(options));
const std::shared_ptr<na2::EvDevPaddle> paddle = std::make_shared<na2::EvDevPaddle>(options.paddleDeviceName);
const std::shared_ptr<na2::NFrame> frame = std::make_shared<na2::NFrame>(paddle);
const std::shared_ptr<na2::NFrame> frame = std::make_shared<na2::NFrame>(options, paddle);

const common2::CommonInitialisation init(frame, paddle, options);

Expand Down
11 changes: 4 additions & 7 deletions source/frontends/ncurses/nframe.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "StdAfx.h"
#include "frontends/common2/commonframe.h"
#include "frontends/ncurses/nframe.h"
#include "frontends/ncurses/colors.h"
#include "frontends/ncurses/asciiart.h"
Expand Down Expand Up @@ -41,8 +42,9 @@ namespace na2
std::shared_ptr<GraphicsColors> colors;
};

NFrame::NFrame(const std::shared_ptr<EvDevPaddle> & paddle)
: myPaddle(paddle)
NFrame::NFrame(const common2::EmulatorOptions & options, const std::shared_ptr<EvDevPaddle> & paddle)
: common2::CommonFrame(options)
, myPaddle(paddle)
, myRows(-1)
, myColumns(-1)
{
Expand Down Expand Up @@ -392,8 +394,3 @@ namespace na2
}

}

void SingleStep(bool /* bReinit */)
{

}
2 changes: 1 addition & 1 deletion source/frontends/ncurses/nframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace na2
class NFrame : public virtual common2::CommonFrame, public common2::GNUFrame
{
public:
NFrame(const std::shared_ptr<EvDevPaddle> & paddle);
NFrame(const common2::EmulatorOptions & options, const std::shared_ptr<EvDevPaddle> & paddle);

WINDOW * GetWindow();
WINDOW * GetStatus();
Expand Down
3 changes: 0 additions & 3 deletions source/frontends/sdl/sdlframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
#include "Core.h"
#include "Utilities.h"
#include "SaveState.h"
#include "Speaker.h"
#include "SoundCore.h"
#include "Interface.h"
#include "NTSC.h"
#include "CPU.h"
#include "MouseInterface.h"
#include "Debugger/Debug.h"

Expand Down
3 changes: 0 additions & 3 deletions source/frontends/sdl/sdlframe.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#pragma once

#include "Common.h"
#include "Configuration/Config.h"
#include "frontends/common2/commonframe.h"
#include "frontends/common2/controllerquit.h"
#include "frontends/common2/speed.h"
#include "frontends/common2/programoptions.h"
#include "linux/network/portfwds.h"
#include <SDL.h>
Expand Down

0 comments on commit a2e888a

Please sign in to comment.