Skip to content

Commit

Permalink
Remove unused kernel options
Browse files Browse the repository at this point in the history
  • Loading branch information
randyrossi committed Oct 8, 2019
1 parent 200a166 commit 072166f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
36 changes: 2 additions & 34 deletions viceoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ extern "C" {
ViceOptions *ViceOptions::s_pThis = 0;

ViceOptions::ViceOptions(void)
: m_nFB1Width(DEFAULT_FB1_WIDTH),
m_nFB1Height(DEFAULT_FB1_HEIGHT),
m_nMachineTiming(MACHINE_TIMING_PAL_HDMI), m_bHideConsole(true),
: m_nMachineTiming(MACHINE_TIMING_PAL_HDMI),
m_bDemoMode(false), m_bSerialEnabled(false), m_nCyclesPerSecond(0),
m_audioOut(VCHIQSoundDestinationAuto) {
s_pThis = this;
Expand All @@ -57,19 +55,7 @@ ViceOptions::ViceOptions(void)
while ((pOption = GetToken()) != 0) {
char *pValue = GetOptionValue(pOption);

if (strcmp(pOption, "canvas_width") == 0) {
unsigned nValue;
if ((nValue = GetDecimal(pValue)) != INVALID_VALUE && MIN_FB1_WIDTH <= nValue &&
nValue <= 1980) {
m_nFB1Width = nValue;
}
} else if (strcmp(pOption, "canvas_height") == 0) {
unsigned nValue;
if ((nValue = GetDecimal(pValue)) != INVALID_VALUE && MIN_FB1_HEIGHT <= nValue &&
nValue <= 1080) {
m_nFB1Height = nValue;
}
} else if (strcmp(pOption, "machine_timing") == 0) {
if (strcmp(pOption, "machine_timing") == 0) {
if (strcmp(pValue, "ntsc") == 0 || strcmp(pValue, "ntsc-hdmi") == 0) {
m_nMachineTiming = MACHINE_TIMING_NTSC_HDMI;
} else if (strcmp(pValue, "ntsc-composite") == 0) {
Expand All @@ -84,12 +70,6 @@ ViceOptions::ViceOptions(void)
} else if (strcmp(pValue, "pal-custom") == 0) {
m_nMachineTiming = MACHINE_TIMING_PAL_CUSTOM;
}
} else if (strcmp(pOption, "hide_console") == 0) {
if (strcmp(pValue, "1") == 0) {
m_bHideConsole = true;
} else {
m_bHideConsole = false;
}
} else if (strcmp(pOption, "demo") == 0) {
if (strcmp(pValue, "1") == 0) {
m_bDemoMode = true;
Expand Down Expand Up @@ -131,20 +111,8 @@ ViceOptions::ViceOptions(void)

ViceOptions::~ViceOptions(void) { s_pThis = 0; }

unsigned ViceOptions::GetFB1Width(void) const {
return m_nFB1Width;
}

unsigned ViceOptions::GetFB1Height(void) const {
return m_nFB1Height;
}

unsigned ViceOptions::GetMachineTiming(void) const { return m_nMachineTiming; }

bool ViceOptions::GetHideConsole(void) const { return m_bHideConsole; }

void ViceOptions::SetHideConsole(bool value) { m_bHideConsole = value; }

bool ViceOptions::GetDemoMode(void) const { return m_bDemoMode; }

bool ViceOptions::SerialEnabled(void) const { return m_bSerialEnabled; }
Expand Down
13 changes: 0 additions & 13 deletions viceoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,14 @@
#include <circle/bcmpropertytags.h>
#include <circle/cputhrottle.h>

#define DEFAULT_FB1_WIDTH 640
#define DEFAULT_FB1_HEIGHT 480

#define MIN_FB1_WIDTH 320
#define MIN_FB1_HEIGHT 240

#define VOLUME_NAME_LEN 16

class ViceOptions {
public:
ViceOptions(void);
~ViceOptions(void);

unsigned GetFB1Width(void) const;
unsigned GetFB1Height(void) const;
unsigned GetMachineTiming(void) const;
bool GetHideConsole(void) const;
void SetHideConsole(bool value);
bool GetDemoMode(void) const;
bool SerialEnabled(void) const;
int GetDiskPartition(void) const;
Expand All @@ -61,10 +51,7 @@ class ViceOptions {
TPropertyTagCommandLine m_TagCommandLine;
char *m_pOptions;

unsigned m_nFB1Width;
unsigned m_nFB1Height;
unsigned m_nMachineTiming;
bool m_bHideConsole;
bool m_bDemoMode;
bool m_bSerialEnabled;
int m_disk_partition;
Expand Down

0 comments on commit 072166f

Please sign in to comment.