18
18
*/
19
19
#include " dreamconn.h"
20
20
21
- #ifdef USE_DREAMCASTCONTROLLER
22
21
#include " hw/maple/maple_devs.h"
22
+ #include " hw/maple/maple_if.h"
23
23
#include " ui/gui.h"
24
24
#include < cfg/option.h>
25
25
#include < SDL.h>
35
35
#include < windows.h>
36
36
#include < setupapi.h>
37
37
#endif
38
- #include < hw/maple/maple_if.h>
39
38
40
39
// TODO: it doesn't seem sound to assume that only one dreamlink will need reconnecting at a time.
41
40
std::shared_ptr<DreamLink> dreamlink_needs_reconnect = nullptr ;
@@ -217,18 +216,9 @@ void DreamConn::connect() {
217
216
218
217
iostream.expires_from_now (std::chrono::duration<u32 >::max ()); // don't use a 64-bit based duration to avoid overflow
219
218
220
- // TODO: unsure whether to adjust or to delete this condition. We need to stay connected to be notified if a peripheral gets plugged back in later on
221
- if (true || (hasVmu () || hasRumble ()))
222
- {
223
- NOTICE_LOG (INPUT, " Connected to DreamcastController[%d]: Type:%s, VMU:%d, Rumble Pack:%d" , bus, getName ().c_str (), hasVmu (), hasRumble ());
224
- maple_io_connected = true ;
225
- }
226
- else
227
- {
228
- WARN_LOG (INPUT, " DreamcastController[%d] connection: no VMU or Rumble Pack connected" , bus);
229
- disconnect ();
230
- return ;
231
- }
219
+ // Remain connected even if no devices were found, so that plugging one in later will be detected
220
+ NOTICE_LOG (INPUT, " Connected to DreamcastController[%d]: Type:%s, VMU:%d, Rumble Pack:%d" , bus, getName ().c_str (), hasVmu (), hasRumble ());
221
+ maple_io_connected = true ;
232
222
}
233
223
234
224
void DreamConn::disconnect () {
@@ -239,5 +229,3 @@ void DreamConn::disconnect() {
239
229
240
230
NOTICE_LOG (INPUT, " Disconnected from DreamcastController[%d]" , bus);
241
231
}
242
-
243
- #endif
0 commit comments