Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #929 from Hyell/master
Browse files Browse the repository at this point in the history
Multiplayers with configuration file
  • Loading branch information
Twinaphex committed May 15, 2016
2 parents 3cb3926 + 469dda0 commit a5b7011
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/hw/maple/maple_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "maple_helper.h"
#include "maple_devs.h"
#include "maple_cfg.h"
#include "cfg/cfg.h"

#define HAS_VMU
/*
Expand Down Expand Up @@ -68,8 +69,16 @@ void mcfg_Create(MapleDeviceType type,u32 bus,u32 port)

void mcfg_CreateDevices()
{
int numberOfControl = cfgLoadInt("players", "nb", 1);
#if DC_PLATFORM == DC_PLATFORM_DREAMCAST
mcfg_Create(MDT_SegaController,0,5);
if (numberOfControl <= 0)
numberOfControl = 1;
if (numberOfControl > 4)
numberOfControl = 4;

for (int i = 0; i < numberOfControl; i++){
mcfg_Create(MDT_SegaController, i, 5);
}

mcfg_Create(MDT_SegaVMU,0,0);
mcfg_Create(MDT_SegaVMU,0,1);
Expand Down

0 comments on commit a5b7011

Please sign in to comment.