Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

jewels: hopefully fix FS#11842, by checking if there are available moves after checking if we should advance to the next level.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29013 a1c6a512-1295-4272-9138-f99709370657

+1 -8
+1 -8
apps/plugins/jewels.c
··· 1433 1433 int button; 1434 1434 int position; 1435 1435 bool selected = false; 1436 - bool no_movesavail; 1437 1436 int x=0, y=0; 1438 1437 1439 1438 bool loaded = jewels_loadgame(bj); ··· 1443 1442 1444 1443 resume_file = false; 1445 1444 while(true) { 1446 - no_movesavail = false; 1447 - 1448 1445 /* refresh the board */ 1449 1446 jewels_drawboard(bj); 1450 1447 ··· 1470 1467 if(selected) { 1471 1468 bj->score += jewels_swapjewels(bj, x, y, SWAP_LEFT); 1472 1469 selected = false; 1473 - if (!jewels_movesavail(bj)) no_movesavail = true; 1474 1470 } else { 1475 1471 x = (x+BJ_WIDTH-1)%BJ_WIDTH; 1476 1472 } ··· 1481 1477 if(selected) { 1482 1478 bj->score += jewels_swapjewels(bj, x, y, SWAP_RIGHT); 1483 1479 selected = false; 1484 - if (!jewels_movesavail(bj)) no_movesavail = true; 1485 1480 } else { 1486 1481 x = (x+1)%BJ_WIDTH; 1487 1482 } ··· 1492 1487 if(selected) { 1493 1488 bj->score += jewels_swapjewels(bj, x, y, SWAP_DOWN); 1494 1489 selected = false; 1495 - if (!jewels_movesavail(bj)) no_movesavail = true; 1496 1490 } else { 1497 1491 y = (y+1)%(BJ_HEIGHT-1); 1498 1492 } ··· 1503 1497 if(selected) { 1504 1498 bj->score += jewels_swapjewels(bj, x, y, SWAP_UP); 1505 1499 selected = false; 1506 - if (!jewels_movesavail(bj)) no_movesavail = true; 1507 1500 } else { 1508 1501 y = (y+(BJ_HEIGHT-1)-1)%(BJ_HEIGHT-1); 1509 1502 } ··· 1569 1562 } 1570 1563 } 1571 1564 1572 - if (no_movesavail) { 1565 + if (!jewels_movesavail(bj)) { 1573 1566 switch(bj->type) { 1574 1567 case GAME_TYPE_NORMAL: 1575 1568 rb->splash(HZ*2, "Game Over!");