
517 F.3d 926 (2008)
RIVIERA DISTRIBUTORS, INC., and Larry L. Hartley, Plaintiffs-Appellees,
v.
Timothy S. JONES and Midwest Electronic Specialties, Inc., Defendants-Appellants.
Nos. 06-2043, 06-3692.
United States Court of Appeals, Seventh Circuit.
Argued October 25, 2007.
Decided February 20, 2008.
*927 Robert M. Riffle (argued), Elias, Meginnes, Riffle & Seghetti, Peoria, IL, for Plaintiffs-Appellees.
James P. Murphy, McAndrews, Held & Malloy, Chicago, IL, Thomas J. Arkell, Dunn, Willard, Arkell & Bugg, Bloomington, IL, for Defendants-Appellants.
Before EASTERBROOK, Chief Judge, and RIPPLE and KANNE, Circuit Judges.
EASTERBROOK, Chief Judge.
Both sides to this litigation hold copyrights in software. Plaintiffs (which we call Riviera) contend that the "Stars and Stripes" video-poker game sold by defendants (which we call Midwest) infringes Riviera's "Americana" source code. (There are several other games and sets of code, which we bypass to simplify the exposition.) After the suit had been pending for more than a year  and long after the time for a voluntary dismissal, without prejudice, under Fed.R.Civ.P. 41(a)(1) had passed  Riviera filed a motion to dismiss. It conceded that it lacked the evidence to prove its claim, though hoping to acquire better evidence in the future it asked the district judge to dismiss without prejudice under Rule 41(a)(2). The district judge dismissed the case, but with prejudice.
Midwest then applied for attorneys' fees under § 101 of the Copyright Act of 1976, codified at 17 U.S.C. § 505. That section authorizes a district court to "award a *928 reasonable attorney's fee to the prevailing party as part of the costs." Unlike many fee-shifting statutes, which entitle prevailing plaintiffs to recover fees as a matter of course but allow prevailing defendants to recover fees only if the suit was frivolous, § 505 treats both sides equally and allows an award in either direction. Fogerty v. Fantasy, Inc., 510 U.S. 517, 114 S.Ct. 1023, 127 L.Ed.2d 455 (1994). Since Fogerty we have held that the prevailing party in copyright litigation is presumptively entitled to reimbursement of its attorneys' fees. See, e.g., Woodhaven Homes & Realty, Inc. v. Hotz, 396 F.3d 822, 824 (7th Cir.2005); Assessment Technologies of Wisconsin, LLC v. WIREdata, Inc., 361 F.3d 434 (7th Cir.2004).
The district court denied Midwest's request for fees, ruling that it is not the prevailing party. The judge wrote that he "did not in any way pass on the merits of the litigation. . . . [T]here has been no evidence of lack of merit to [Riviera's] copyright infringement claims and no finding with respect to the merits of the case. The Court therefore does not believe that [Midwest is] entitled to prevailing party status on the facts of this case."
This approach supposes that the content of a judge's opinion is what makes a litigant a prevailing party. If the judge sustains a litigant's position on the merits, then it "prevails"; otherwise not. The Supreme Court took a different view in Buckhannon Board & Care Home, Inc. v. West Virginia Dep't of Health & Human Resources, 532 U.S. 598, 121 S.Ct. 1835, 149 L.Ed.2d 855 (2001), which holds that a litigant "prevails" (for the purpose of fee-shifting statutes) when it obtains a "material alteration of the legal relationship of the parties", 532 U.S. at 604, 121 S.Ct. 1835, quoting from Texas State Teachers Ass'n v. Garland Independent School District, 489 U.S. 782, 792-93, 109 S.Ct. 1486, 103 L.Ed.2d 866 (1989). A judgment in a party's favor has such an effect, which is why a consent decree confers prevailing-party status even though everyone denies liability as part of the underlying settlement, and the judge takes no position on the merits.
Midwest obtained a favorable judgment. That this came about when Riviera threw in the towel does not make Midwest less the victor than it would have been had the judge granted summary judgment or a jury returned a verdict in its favor. Riviera sued; Midwest won; no more is required. See Mother & Father v. Cassidy, 338 F.3d 704, 708 (7th Cir.2003) (dismissal under Rule 41(a)(2), with prejudice, after a plaintiff gives up makes the defendant the prevailing party). The district court recognized as much when it awarded costs to Midwest under Fed.R.Civ.P. 54. Only the "prevailing party" is entitled to costs. Because Midwest is the prevailing party for regular costs, it must be the prevailing party for the purpose of § 505, which allows an award of attorneys' fees as part of costs.
What remains is the question whether this is an appropriate occasion for fee shifting. The district judge thought not, writing that "the Court rejects the suggestion that [Riviera's] pursuit of this action was frivolous, baseless, or objectively unreasonable." This is not, however, the standard for an award under § 505; it is the standard used under statutes such as 42 U.S.C. § 1988 that authorize an award to a prevailing defendant only if the suit is frivolous or vexatious. Fogerty rejects such an asymmetric approach for § 505.
Is there any reason not to honor the presumption that the prevailing party, plaintiff or defendant, recovers attorneys' fees under § 505? The district judge observed *929 that he denied Midwest's motion to dismiss the complaint, but that's a common step on the way to a decision and not a good reason to force the prevailing party to swallow the legal costs of the suit. The judge hinted that Midwest should be penalized for abandoning an attempt at mediation, but any litigant is entitled to insist that its case be adjudicated. Curtailing mediation actually held down the costs of defense. The district court also chastised Midwest for delay in responding to Riviera's discovery requests. The judge would have been within his rights to lop off any fees incurred to frustrate or drag out discovery, but an award of zero for the case as a whole is not an appropriate response to the wrangling that is regrettably common in discovery.
This case turns out to be an especially good candidate for fee shifting under § 505, because it was filed in the teeth of an agreement not to sue. Riviera and Midwest have been at each others' throats for years, and this is the second suit based on fundamentally the same claim of infringement. Eventually the first suit was settled. One clause of the settlement provides for alternative dispute resolution of any future claims:
In the event that either party hereto believes that its rights as to the Riviera [intellectual property] Rights or Enhancements have been violated by [Midwest], then such source code and programs shall be provided to a mutually agreeable, independent software expert who shall inspect and review such applicable source code and programs and determine such questions. The parties agree to be bound by the findings of the independent software expert.
Riviera says that, after the settlement, Midwest went right on infringing its copyrights. But the point of a clause such as the one quoted above is to submit to an expert the question whether any of Midwest's games uses Riviera's source code. Riviera can't justify this suit by assuming an affirmative answer to the very question that the expert is supposed to decide.
When Midwest moved to dismiss Riviera's complaint, it brought this clause to the district judge's attention. The judge's order denying the motion to dismiss does not mention Riviera's agreement to have an expert, rather than a judge, resolve any controversy about infringement. Perhaps the judge assumed that, because this agreement is not a traditional arbitration clause, it is ineffectual. But we held in Omni Tech Corp. v. MPC Solutions Sales, LLC, 432 F.3d 797 (7th Cir.2005), that agreements to engage in alternative dispute resolution must be enforced, if they are valid as a matter of state contract law, whether or not they are aptly labeled "arbitration." In Omni Tech the agreement was one to have a financial dispute resolved by an accountant; here the agreement is one to have a dispute about how software source code has been used resolved by a programmer. There is no basis on which Omni Tech can be distinguished  and Riviera does not even try. Its sole argument is that by asserting that infringement has continued, it liberates itself from the agreement to have an expert resolve any dispute about infringement.
Riviera came to the wrong forum. Agreements such as the one between Riviera and Midwest are designed to reduce the price tag of decision-making. By filing another suit, Riviera forced Midwest to bear the very expenses that the parties had agreed to avoid. The party responsible for creating excessive legal costs must bear them itself in the end.
This conclusion makes it unnecessary to discuss the parties' other disputes, such as whether by filing a second suit Riviera *930 entitled Midwest to an award under 28 U.S.C. § 1927.
The judgment is reversed, and the case is remanded for an award of reasonable attorneys' fees to Midwest under 17 U.S.C. § 505. The award should include the legal fees that Midwest has incurred to vindicate its rights on appeal.
