Permalink
Browse files

Recognize 'h' in addition to 'q' in file names for half-resolution mo…

…des.
  • Loading branch information...
1 parent 9e1e5d0 commit 913b480880ee5229cdeabac69f3acc1e3a893f33 @marlam marlam committed Dec 14, 2010
Showing with 14 additions and 6 deletions.
  1. +14 −6 src/input.cpp
View
20 src/input.cpp
@@ -272,33 +272,41 @@ void input::open(std::vector<decoder *> decoders,
_mode = left_right;
_swap_eyes = true;
}
- else if (name.length() >= 4 && name.substr(name.length() - 4, 4) == "-lrq")
+ else if (name.length() >= 4
+ && (name.substr(name.length() - 4, 4) == "-lrh"
+ || name.substr(name.length() - 4, 4) == "-lrq"))
{
_mode = left_right_half;
}
- else if (name.length() >= 4 && name.substr(name.length() - 4, 4) == "-rlq")
+ else if (name.length() >= 4
+ && (name.substr(name.length() - 4, 4) == "-rlh"
+ || name.substr(name.length() - 4, 4) == "-rlq"))
{
_mode = left_right_half;
_swap_eyes = true;
}
else if (name.length() >= 3
- && (name.substr(name.length() - 3, 3) == "-tb" || name.substr(name.length() - 3, 3) == "-ab"))
+ && (name.substr(name.length() - 3, 3) == "-tb"
+ || name.substr(name.length() - 3, 3) == "-ab"))
{
_mode = top_bottom;
}
else if (name.length() >= 3
- && (name.substr(name.length() - 3, 3) == "-bt" || name.substr(name.length() - 3, 3) == "-ba"))
+ && (name.substr(name.length() - 3, 3) == "-bt"
+ || name.substr(name.length() - 3, 3) == "-ba"))
{
_mode = top_bottom;
_swap_eyes = true;
}
else if (name.length() >= 4
- && (name.substr(name.length() - 4, 4) == "-tbq" || name.substr(name.length() - 3, 3) == "-abq"))
+ && (name.substr(name.length() - 4, 4) == "-tbh"
+ || name.substr(name.length() - 3, 3) == "-abq"))
{
_mode = top_bottom_half;
}
else if (name.length() >= 4
- && (name.substr(name.length() - 4, 4) == "-btq" || name.substr(name.length() - 3, 3) == "-baq"))
+ && (name.substr(name.length() - 4, 4) == "-bth"
+ || name.substr(name.length() - 3, 3) == "-baq"))
{
_mode = top_bottom_half;
_swap_eyes = true;

0 comments on commit 913b480

Please sign in to comment.